From 6ef83209bdd09c43eb98e8340ccc2a18d09a098b Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 27 Dec 2006 06:45:19 +0000 Subject: [PATCH] Add a g_return_if_fail. (#362614, Xan Lopez) 2006-12-27 Matthias Clasen * gtk/gtkwidget.c (gtk_widget_show): Add a g_return_if_fail. (#362614, Xan Lopez) --- ChangeLog | 5 +++++ gtk/gtkwidget.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index e7f92438e5..4518a7fdf5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-12-27 Matthias Clasen + + * gtk/gtkwidget.c (gtk_widget_show): Add a g_return_if_fail. + (#362614, Xan Lopez) + 2006-12-27 Matthias Clasen * gtk/gtkuimanager.c (update_node): If a required action diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 81eee92462..f021bf028d 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -2239,6 +2239,8 @@ gtk_widget_destroyed (GtkWidget *widget, void gtk_widget_show (GtkWidget *widget) { + g_return_if_fail (GTK_IS_WIDGET (widget)); + if (!GTK_WIDGET_VISIBLE (widget)) { g_object_ref (widget);