Only unref the pixbuf if the image has the appropriate storage type.

2006-05-18  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkimage.c (icon_theme_changed): Only unref the pixbuf
	if the image has the appropriate storage type.  (#342096, Tommi
	Komulainen)
This commit is contained in:
Matthias Clasen 2006-05-18 16:50:49 +00:00 committed by Matthias Clasen
parent 6c3b555450
commit 91d11444f4
3 changed files with 15 additions and 4 deletions

View File

@ -1,5 +1,9 @@
2006-05-18 Matthias Clasen <mclasen@redhat.com> 2006-05-18 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkimage.c (icon_theme_changed): Only unref the pixbuf
if the image has the appropriate storage type. (#342096, Tommi
Komulainen)
* configure.in: Actually require GLib 2.11 * configure.in: Actually require GLib 2.11
* gtk/gtkentry.c (gtk_entry_drag_data_received): Make drops * gtk/gtkentry.c (gtk_entry_drag_data_received): Make drops

View File

@ -1,5 +1,9 @@
2006-05-18 Matthias Clasen <mclasen@redhat.com> 2006-05-18 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkimage.c (icon_theme_changed): Only unref the pixbuf
if the image has the appropriate storage type. (#342096, Tommi
Komulainen)
* configure.in: Actually require GLib 2.11 * configure.in: Actually require GLib 2.11
* gtk/gtkentry.c (gtk_entry_drag_data_received): Make drops * gtk/gtkentry.c (gtk_entry_drag_data_received): Make drops

View File

@ -1383,11 +1383,14 @@ animation_timeout (gpointer data)
static void static void
icon_theme_changed (GtkImage *image) icon_theme_changed (GtkImage *image)
{ {
if (image->data.name.pixbuf) if (image->storage_type == GTK_IMAGE_ICON_NAME)
g_object_unref (image->data.name.pixbuf); {
image->data.name.pixbuf = NULL; if (image->data.name.pixbuf)
g_object_unref (image->data.name.pixbuf);
image->data.name.pixbuf = NULL;
gtk_widget_queue_draw (GTK_WIDGET (image)); gtk_widget_queue_draw (GTK_WIDGET (image));
}
} }
static void static void