[gtkhtml] Add argument guards to gtk_html_command().



commit cba547b2c396a52506a2e4f518f0f2a25490bc62
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri Oct 23 12:02:26 2009 -0400

    Add argument guards to gtk_html_command().

 gtkhtml/gtkhtml.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtkhtml/gtkhtml.c b/gtkhtml/gtkhtml.c
index bd2d814..e78ba1d 100644
--- a/gtkhtml/gtkhtml.c
+++ b/gtkhtml/gtkhtml.c
@@ -6001,6 +6001,9 @@ gtk_html_command (GtkHTML *html, const gchar *command_name)
 	GEnumClass *class;
 	GEnumValue *val;
 
+	g_return_val_if_fail (GTK_IS_HTML (html), FALSE);
+	g_return_val_if_fail (command_name != NULL, FALSE);
+
 	class = G_ENUM_CLASS (g_type_class_ref (GTK_TYPE_HTML_COMMAND));
 	val = g_enum_get_value_by_nick (class, command_name);
 	g_type_class_unref (class);



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