From: phantomjinx <pha...@us...> - 2011-09-02 22:31:03
|
commit a88d5cc705af526c6553116725517ae6e8e7d6b2 Author: phantomjinx <p.g...@ph...> Date: Wed Aug 24 10:29:54 2011 +0100 Stop unrefing NULL album art * When loading covers in coverart display, we are unrefing the albumart regardless of whether it has been loaded or whether there is any. Check whether we actually have a reference before unrefing it. plugins/cover_display/display_coverart.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) --- diff --git a/plugins/cover_display/display_coverart.c b/plugins/cover_display/display_coverart.c index f108e93..fe563c9 100644 --- a/plugins/cover_display/display_coverart.c +++ b/plugins/cover_display/display_coverart.c @@ -398,8 +398,11 @@ static void draw(cairo_t *cairo_context) { cover->album = album; if (force_pixbuf_covers) { - g_object_unref(album->albumart); - album->albumart = NULL; + if (album->albumart) { + g_object_unref(album->albumart); + album->albumart = NULL; + } + if (album->scaled_art != NULL) { g_object_unref(album->scaled_art); album->scaled_art = NULL; |