Only set the text if it is not NULL. (#319930, Thomas Klausner)
2005-10-27 Matthias Clasen <mclasen@redhat.com> * 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)
This commit is contained in:
committed by
Matthias Clasen
parent
e80f12b676
commit
bc41f73c4c
@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user