[gimp/blend-tool-fun: 3/10] app: Relax preconditions on gimp_gradient_get_color_at



commit f4033896da699f9809321578e2e70fc1a5327bbb
Author: Michael Henning <drawoc darkrefraction com>
Date:   Fri Jun 13 12:51:59 2014 -0400

    app: Relax preconditions on gimp_gradient_get_color_at
    
    The context can now be null unless the gradient specifically needs
    the foreground/background colors, in which case
    gimp_context_get_{foreground,background} will do the check and warn.

 app/core/gimpgradient.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
---
diff --git a/app/core/gimpgradient.c b/app/core/gimpgradient.c
index 85884eb..7935a6c 100644
--- a/app/core/gimpgradient.c
+++ b/app/core/gimpgradient.c
@@ -395,7 +395,6 @@ gimp_gradient_get_color_at (GimpGradient        *gradient,
   GimpRGB  rgb;
 
   g_return_val_if_fail (GIMP_IS_GRADIENT (gradient), NULL);
-  g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
   g_return_val_if_fail (color != NULL, NULL);
 
   pos = CLAMP (pos, 0.0, 1.0);


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