Hi,

I was trying to figure out how searching worked with GtkHTML, and I
discovered the following minor bug.  Calling gtk_html_isearch() assumed
that the editor component had already been set.  If it wasn't, you got a
segfault.

Now, I haven't actually found anywhere that the editor API *is* set, so
pointers to an example would also be appreciated. :)

Here's the trivial patch:

$ svn diff gtkhtml-search.c
Index: gtkhtml-search.c
===================================================================
--- gtkhtml-search.c    (revision 9027)
+++ gtkhtml-search.c    (working copy)
@@ -123,7 +123,7 @@
 {
        GtkHTMLISearch *data;
 
-       if (!html->editor_api->create_input_line)
+       if (!html->editor_api || !html->editor_api->create_input_line)
                return;
 
        if (!html->priv->search_input_line) {


-- 
Andrew S. Townley <[EMAIL PROTECTED]>
http://atownley.org

_______________________________________________
Evolution-hackers mailing list
Evolution-hackers@gnome.org
http://mail.gnome.org/mailman/listinfo/evolution-hackers

Reply via email to