Author: post
Date: 2010-12-19 18:05:54 +0100 (Sun, 19 Dec 2010)
New Revision: 3681

Modified:
   trunk/src/rs-store.c
Log:
Avoid crash on unloadable thumbnails.

Modified: trunk/src/rs-store.c
===================================================================
--- trunk/src/rs-store.c        2010-12-18 17:42:33 UTC (rev 3680)
+++ trunk/src/rs-store.c        2010-12-19 17:05:54 UTC (rev 3681)
@@ -2742,9 +2742,13 @@
        pixbuf = rs_metadata_get_thumbnail(metadata);
 
        if (pixbuf==NULL)
+       {
                /* We will use this, if no thumbnail can be loaded */
-               pixbuf = gtk_widget_render_icon(GTK_WIDGET(job->store),
+               pixbuf2 = gtk_widget_render_icon(GTK_WIDGET(job->store),
                        GTK_STOCK_MISSING_IMAGE, GTK_ICON_SIZE_DIALOG, NULL);
+               pixbuf = gdk_pixbuf_copy(pixbuf2);
+               g_object_unref(pixbuf2);
+       }
 #if GTK_CHECK_VERSION(2,8,0)
        else
        {


_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit

Reply via email to