[gtkhtml/gnome-2-28] Fix an editing crash.



commit 835d5dee8aaf078960b16ebd9018da095b1bcfbd
Author: Matthew Barnes <mbarnes redhat com>
Date:   Mon Sep 21 10:37:33 2009 -0400

    Fix an editing crash.
    
    Apparently G_VALUE_HOLDS() doesn't like NULL GValues.

 components/editor/gtkhtml-editor.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/components/editor/gtkhtml-editor.c b/components/editor/gtkhtml-editor.c
index aca15f9..58ae08f 100644
--- a/components/editor/gtkhtml-editor.c
+++ b/components/editor/gtkhtml-editor.c
@@ -384,7 +384,7 @@ editor_method_event (GtkHTML *html,
 	guint signal_id;
 
 	/* GtkHTML event arguments are either NULL or a single string. */
-	if (G_VALUE_HOLDS (args, G_TYPE_STRING))
+	if (args != NULL && G_VALUE_HOLDS (args, G_TYPE_STRING))
 		string = g_value_get_string (args);
 
 	switch (event) {



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