[Evolution-hackers] PATCH: gtkhtml-search.c fixes segfault in gtk_html_isearch


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

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)
 	if (!html->priv->search_input_line) {

Andrew S. Townley <ast atownley org>

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]