[gimp] app: don't call gimp_layer_get_edit_mask() when the layer has no mask



commit fbf11ba84f70fdf3b87bde020a73d9d7f3483245
Author: Michael Natterer <mitch gimp org>
Date:   Sat Mar 17 22:49:50 2012 +0100

    app: don't call gimp_layer_get_edit_mask() when the layer has no mask

 app/widgets/gimplayertreeview.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/app/widgets/gimplayertreeview.c b/app/widgets/gimplayertreeview.c
index 5734f61..4f3f9f3 100644
--- a/app/widgets/gimplayertreeview.c
+++ b/app/widgets/gimplayertreeview.c
@@ -1318,9 +1318,12 @@ gimp_layer_tree_view_layer_clicked (GimpCellRendererViewable *cell,
         {
           GimpLayer *layer = GIMP_LAYER (renderer->viewable);
 
-          if (gimp_layer_get_edit_mask (layer))
-            gimp_action_group_set_action_active (group,
-                                                 "layers-mask-edit", FALSE);
+          if (gimp_layer_get_mask (layer) &&
+              gimp_layer_get_edit_mask (layer))
+            {
+              gimp_action_group_set_action_active (group,
+                                                   "layers-mask-edit", FALSE);
+            }
 
           g_object_unref (renderer);
         }



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