[gimp] Fix precondition check when duplicating group layers



commit 13e39d7e2cc6bfdb288998785b31dc8183e56129
Author: Michael Natterer <mitch gimp org>
Date:   Mon Sep 21 18:41:54 2009 +0200

    Fix precondition check when duplicating group layers
    
    (gimp_group_layer_duplicate): change the allowed type of the duplicate
    from GIMP_TYPE_GROUP_LAYER to GIMP_TYPE_DRAWABLE. The former was
    simply a braino when copying and modifying the GimpLayer code.

 app/core/gimpgrouplayer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/app/core/gimpgrouplayer.c b/app/core/gimpgrouplayer.c
index 31aba68..f1b3d72 100644
--- a/app/core/gimpgrouplayer.c
+++ b/app/core/gimpgrouplayer.c
@@ -326,7 +326,7 @@ gimp_group_layer_duplicate (GimpItem *item,
 {
   GimpItem *new_item;
 
-  g_return_val_if_fail (g_type_is_a (new_type, GIMP_TYPE_GROUP_LAYER), NULL);
+  g_return_val_if_fail (g_type_is_a (new_type, GIMP_TYPE_DRAWABLE), NULL);
 
   new_item = GIMP_ITEM_CLASS (parent_class)->duplicate (item, new_type);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]