From 913cdc1aed7ac796d50e1f25225f82c7a79d5995 Mon Sep 17 00:00:00 2001 From: Pedro Gimeno Date: Sat, 27 Dec 2003 00:57:05 +0000 Subject: [PATCH] actually don't crash when layer previews are disabled. Fixes the crash 2003-12-27 Pedro Gimeno * plug-ins/common/jigsaw.c (jigsaw): actually don't crash when layer previews are disabled. Fixes the crash reported in bug #112012, but not the bug itself. --- ChangeLog | 6 ++++++ plug-ins/common/jigsaw.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 531580b4b9..aea2877762 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-12-27 Pedro Gimeno + + * plug-ins/common/jigsaw.c (jigsaw): actually don't crash when + layer previews are disabled. Fixes the crash reported in bug + #112012, but not the bug itself. + 2003-12-26 Sven Neumann * app/core/gimpimagefile.c (gimp_imagefile_save_thumb): don't crash diff --git a/plug-ins/common/jigsaw.c b/plug-ins/common/jigsaw.c index 6d9b55707b..4f61f532c1 100644 --- a/plug-ins/common/jigsaw.c +++ b/plug-ins/common/jigsaw.c @@ -510,6 +510,8 @@ jigsaw (gboolean preview_mode) height = preview->height; bytes = preview->bpp; buffer_size = preview->rowstride * height; + if (buffer_size == 0) + return -1; } else {