[gimp] app: move deref after NULL check



commit 77e6ab690d273a723d649f2e8ff92960765761e0
Author: Mikael Magnusson <mikachu src gnome org>
Date:   Sat Jun 15 23:18:17 2013 +0200

    app: move deref after NULL check

 app/operations/gimpoperationcagecoefcalc.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/app/operations/gimpoperationcagecoefcalc.c b/app/operations/gimpoperationcagecoefcalc.c
index 4a164f8..33b4148 100644
--- a/app/operations/gimpoperationcagecoefcalc.c
+++ b/app/operations/gimpoperationcagecoefcalc.c
@@ -201,7 +201,7 @@ gimp_operation_cage_coef_calc_process (GeglOperation       *operation,
   GimpOperationCageCoefCalc *occc   = GIMP_OPERATION_CAGE_COEF_CALC (operation);
   GimpCageConfig            *config = GIMP_CAGE_CONFIG (occc->config);
 
-  const Babl *format = babl_format_n (babl_type ("float"), 2 * gimp_cage_config_get_n_points (config));
+  const Babl *format;
 
   GeglBufferIterator *it;
   guint               n_cage_vertices;
@@ -210,6 +210,8 @@ gimp_operation_cage_coef_calc_process (GeglOperation       *operation,
   if (! config)
     return FALSE;
 
+  format = babl_format_n (babl_type ("float"), 2 * gimp_cage_config_get_n_points (config));
+
   n_cage_vertices   = gimp_cage_config_get_n_points (config);
 
   it = gegl_buffer_iterator_new (output, roi, 0, format,


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