No post-processing for animated gifs (2)
authorColin Clark <colin.clark@cclark.uk>
Sun, 20 Dec 2020 15:39:10 +0000 (15:39 +0000)
committerColin Clark <colin.clark@cclark.uk>
Sun, 20 Dec 2020 15:39:10 +0000 (15:39 +0000)
Check for no layout window.

src/image.c

index 7226927..ec08f67 100644 (file)
@@ -1404,7 +1404,7 @@ void image_change_pixbuf(ImageWindow *imd, GdkPixbuf *pixbuf, gdouble zoom, gboo
 
        /* Color correction takes too much time for an animated gif */
        lw = layout_find_by_image(imd);
-       if (imd->color_profile_enable && !lw->animation)
+       if (imd->color_profile_enable && lw && !lw->animation)
                {
                image_post_process_color(imd, 0, FALSE); /* TODO: error handling */
                }