[gimp] app: fix uninitialized variables.



commit 255f2e1cdf973825c330e7df13a5ee716541ee7b
Author: Jehan <jehan girinstud io>
Date:   Thu Nov 15 13:56:54 2018 +0100

    app: fix uninitialized variables.

 app/core/gimppickable-contiguous-region.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/app/core/gimppickable-contiguous-region.c b/app/core/gimppickable-contiguous-region.c
index 0922c54efc..b9cf47b35f 100644
--- a/app/core/gimppickable-contiguous-region.c
+++ b/app/core/gimppickable-contiguous-region.c
@@ -240,12 +240,22 @@ gimp_pickable_contiguous_region_by_seed (GimpPickable        *pickable,
       select_transparent = FALSE;
       select_criterion   = GIMP_SELECT_CRITERION_COMPOSITE;
       diagonal_neighbors = FALSE;
+
+      format = choose_format (src_buffer, select_criterion,
+                              &n_components, &has_alpha);
+      gegl_buffer_sample (src_buffer, x, y, NULL, start_col, format,
+                          GEGL_SAMPLER_NEAREST, GEGL_ABYSS_NONE);
     }
   else
     {
       gimp_pickable_flush (pickable);
       src_buffer = gimp_pickable_get_buffer (pickable);
 
+      format = choose_format (src_buffer, select_criterion,
+                              &n_components, &has_alpha);
+      gegl_buffer_sample (src_buffer, x, y, NULL, start_col, format,
+                          GEGL_SAMPLER_NEAREST, GEGL_ABYSS_NONE);
+
       if (has_alpha)
         {
           if (select_transparent)
@@ -263,12 +273,6 @@ gimp_pickable_contiguous_region_by_seed (GimpPickable        *pickable,
         }
     }
 
-  format = choose_format (src_buffer, select_criterion,
-                          &n_components, &has_alpha);
-
-  gegl_buffer_sample (src_buffer, x, y, NULL, start_col, format,
-                      GEGL_SAMPLER_NEAREST, GEGL_ABYSS_NONE);
-
   extent = *gegl_buffer_get_extent (src_buffer);
 
   mask_buffer = gegl_buffer_new (&extent, babl_format ("Y float"));


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