diff --git a/ChangeLog b/ChangeLog index 16b9e50d4d..b3e234c60c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-10-27 Matthias Clasen + + * demos/gtk-demo/clipboard.c (paste_received): Only set the + text if it is not NULL. (#319930, Thomas Klausner) + + * gtk/gtkselection.c (gtk_selection_data_get_pixbuf): Close the + loader before trying to get the pixbuf. (#319930, Thomas Klausner) + 2005-10-26 Matthias Clasen * gtk/gtkfilesystem.c (gtk_file_system_module_load): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 16b9e50d4d..b3e234c60c 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +2005-10-27 Matthias Clasen + + * demos/gtk-demo/clipboard.c (paste_received): Only set the + text if it is not NULL. (#319930, Thomas Klausner) + + * gtk/gtkselection.c (gtk_selection_data_get_pixbuf): Close the + loader before trying to get the pixbuf. (#319930, Thomas Klausner) + 2005-10-26 Matthias Clasen * gtk/gtkfilesystem.c (gtk_file_system_module_load): diff --git a/demos/gtk-demo/clipboard.c b/demos/gtk-demo/clipboard.c index 96a993db5a..9a85685379 100644 --- a/demos/gtk-demo/clipboard.c +++ b/demos/gtk-demo/clipboard.c @@ -41,7 +41,8 @@ paste_received (GtkClipboard *clipboard, entry = GTK_WIDGET (user_data); /* Set the entry text */ - gtk_entry_set_text (GTK_ENTRY (entry), text); + if(text) + gtk_entry_set_text (GTK_ENTRY (entry), text); } void diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c index d6fa64c2fa..dc8683dea2 100644 --- a/gtk/gtkselection.c +++ b/gtk/gtkselection.c @@ -1416,16 +1416,16 @@ gtk_selection_data_get_pixbuf (GtkSelectionData *selection_data) { loader = gdk_pixbuf_loader_new (); - if (gdk_pixbuf_loader_write (loader, - selection_data->data, - selection_data->length, - NULL)) - result = gdk_pixbuf_loader_get_pixbuf (loader); + gdk_pixbuf_loader_write (loader, + selection_data->data, + selection_data->length, + NULL); + gdk_pixbuf_loader_close (loader, NULL); + result = gdk_pixbuf_loader_get_pixbuf (loader); if (result) g_object_ref (result); - gdk_pixbuf_loader_close (loader, NULL); g_object_unref (loader); }