[gimp] app: Return NULL on failure in gimp_drawable_foreground_extract



commit fd928cde0727ec0a0211e3ed6673f01c4668dfcd
Author: Michael Henning <drawoc darkrefraction com>
Date:   Tue Jun 3 21:41:04 2014 -0400

    app: Return NULL on failure in gimp_drawable_foreground_extract
    
    It is not a void function.

 app/core/gimpdrawable-foreground-extract.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/app/core/gimpdrawable-foreground-extract.c b/app/core/gimpdrawable-foreground-extract.c
index ec0df81..8f93e1a 100644
--- a/app/core/gimpdrawable-foreground-extract.c
+++ b/app/core/gimpdrawable-foreground-extract.c
@@ -57,9 +57,9 @@ gimp_drawable_foreground_extract (GimpDrawable      *drawable,
   GeglProcessor *processor;
   gdouble        value;
 
-  g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
-  g_return_if_fail (GEGL_IS_BUFFER (trimap));
-  g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
+  g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), NULL);
+  g_return_val_if_fail (GEGL_IS_BUFFER (trimap), NULL);
+  g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), NULL);
 
   progress = gimp_progress_start (progress,
                                   _("Computing alpha of unknown pixels"),


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