From 0953146be10a2d6c23ac53de90fd95e3e000c4e0 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Thu, 20 Aug 2009 22:41:49 +0200 Subject: [PATCH] Check if there is an active layer if active_layer_only is TRUE --- app/core/gimpimage-crop.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/core/gimpimage-crop.c b/app/core/gimpimage-crop.c index 9cdaa5ee9d..40ebcde906 100644 --- a/app/core/gimpimage-crop.c +++ b/app/core/gimpimage-crop.c @@ -89,6 +89,8 @@ gimp_image_crop (GimpImage *image, g_return_if_fail (GIMP_IS_IMAGE (image)); g_return_if_fail (GIMP_IS_CONTEXT (context)); + g_return_if_fail (active_layer_only == FALSE || + gimp_image_get_active_layer (image)); previous_width = gimp_image_get_width (image); previous_height = gimp_image_get_height (image);