Check arguments. (#317491, Paolo Borelli)

2005-09-29  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkbutton.c (gtk_button_set_image): Check arguments.  (#317491,
	Paolo Borelli)
This commit is contained in:
Matthias Clasen 2005-09-29 13:42:21 +00:00 committed by Matthias Clasen
parent f6501cb4bd
commit 56b4314ae9
3 changed files with 12 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2005-09-29 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkbutton.c (gtk_button_set_image): Check arguments. (#317491,
Paolo Borelli)
* gtk/gtkpaned.c (gtk_paned_grab_notify): Stop drags when being
grab shadowed. (#317332)

View File

@ -1,5 +1,8 @@
2005-09-29 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkbutton.c (gtk_button_set_image): Check arguments. (#317491,
Paolo Borelli)
* gtk/gtkpaned.c (gtk_paned_grab_notify): Stop drags when being
grab shadowed. (#317332)

View File

@ -1845,7 +1845,12 @@ void
gtk_button_set_image (GtkButton *button,
GtkWidget *image)
{
GtkButtonPrivate *priv = GTK_BUTTON_GET_PRIVATE (button);
GtkButtonPrivate *priv;
g_return_if_fail (GTK_IS_BUTTON (button));
g_return_if_fail (image == NULL || GTK_IS_WIDGET (image));
priv = GTK_BUTTON_GET_PRIVATE (button);
priv->image = image;
priv->image_is_stock = (image == NULL);