gdk-pixbuf/test-loaders.c (test_loader): Catch errors at close time.
gdk-pixbuf/test-loaders.c (main): Remove C++ comments. demos/testpixbuf.c (update_timeout): Use gdk_pixbuf_loader_get_pixbuf only in response to an area_prepared signal.
This commit is contained in:
@ -449,19 +449,15 @@ update_timeout(gpointer data)
|
||||
}
|
||||
|
||||
|
||||
} else { /* Really done */
|
||||
|
||||
GdkPixbuf *pixbuf = gdk_pixbuf_loader_get_pixbuf (status->loader);
|
||||
new_testrgb_window (pixbuf, "After progressive load");
|
||||
done = TRUE;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
done = TRUE;
|
||||
|
||||
if (done) {
|
||||
gtk_widget_queue_draw(*status->rgbwin);
|
||||
/* ignoring errors, we should not do that. */
|
||||
gdk_pixbuf_loader_close (GDK_PIXBUF_LOADER (status->loader), NULL);
|
||||
g_object_unref (G_OBJECT(status->loader));
|
||||
gtk_widget_queue_draw (*status->rgbwin);
|
||||
g_object_unref (G_OBJECT (status->loader));
|
||||
fclose (status->imagefile);
|
||||
g_free (status->buf);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user