diff options
Diffstat (limited to 'plugins/gtkui/coverart.c')
-rw-r--r-- | plugins/gtkui/coverart.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/gtkui/coverart.c b/plugins/gtkui/coverart.c index d5f34c26..7fb50554 100644 --- a/plugins/gtkui/coverart.c +++ b/plugins/gtkui/coverart.c @@ -142,16 +142,24 @@ loading_thread (void *none) { } // GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file (queue->fname, NULL); - GError *error; + GError *error = NULL; GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file_at_scale (queue->fname, queue->width, queue->width, TRUE, &error); if (!pixbuf) { unlink (queue->fname); fprintf (stderr, "gdk_pixbuf_new_from_file_at_scale %s %d failed, error: %s\n", queue->fname, queue->width, error->message); + if (error) { + g_error_free (error); + error = NULL; + } pixbuf = gdk_pixbuf_new_from_file_at_scale (DEFAULT_COVER_PATH, queue->width, queue->width, TRUE, &error); if (!pixbuf) { fprintf (stderr, "gdk_pixbuf_new_from_file_at_scale %s %d failed, error: %s\n", DEFAULT_COVER_PATH, queue->width, error->message); } } + if (error) { + g_error_free (error); + error = NULL; + } if (!pixbuf) { // make default empty image pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, 2, 2); |