[gimp] Use gimp_drawable_type() instead of drawable->type



commit e77f6b10f4309cd4300fe900dd0210bc0518bddc
Author: Michael Natterer <mitch gimp org>
Date:   Tue Sep 8 17:07:33 2009 +0200

    Use gimp_drawable_type() instead of drawable->type

 app/core/gimpdrawablemodundo.c |    2 +-
 app/core/gimplayer.c           |    4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/app/core/gimpdrawablemodundo.c b/app/core/gimpdrawablemodundo.c
index 08025f4..3615592 100644
--- a/app/core/gimpdrawablemodundo.c
+++ b/app/core/gimpdrawablemodundo.c
@@ -127,7 +127,7 @@ gimp_drawable_mod_undo_pop (GimpUndo            *undo,
   offset_y = drawable_mod_undo->offset_y;
 
   drawable_mod_undo->tiles = tile_manager_ref (gimp_drawable_get_tiles (drawable));
-  drawable_mod_undo->type  = drawable->type;
+  drawable_mod_undo->type  = gimp_drawable_type (drawable);
 
   gimp_item_get_offset (GIMP_ITEM (drawable),
                         &drawable_mod_undo->offset_x,
diff --git a/app/core/gimplayer.c b/app/core/gimplayer.c
index 8fa7ac7..f9cda66 100644
--- a/app/core/gimplayer.c
+++ b/app/core/gimplayer.c
@@ -1530,9 +1530,7 @@ gimp_layer_create_mask (const GimpLayer *layer,
     case GIMP_ADD_COPY_MASK:
       {
         TileManager   *copy_tiles = NULL;
-        GimpImageType  layer_type;
-
-        layer_type = drawable->type;
+        GimpImageType  layer_type = gimp_drawable_type (drawable);
 
         if (GIMP_IMAGE_TYPE_BASE_TYPE (layer_type) != GIMP_GRAY)
           {



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