[gimp] app: add precondition check on "object" in gimp_context_set_by_type()



commit 33276a000ef3410c1d4c163066bfeb605d7b7ae4
Author: Michael Natterer <mitch gimp org>
Date:   Wed Oct 12 22:44:19 2016 +0200

    app: add precondition check on "object" in gimp_context_set_by_type()

 app/core/gimpcontext.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/app/core/gimpcontext.c b/app/core/gimpcontext.c
index af5727d..6c2412c 100644
--- a/app/core/gimpcontext.c
+++ b/app/core/gimpcontext.c
@@ -1945,6 +1945,7 @@ gimp_context_set_by_type (GimpContext *context,
   GValue               value = G_VALUE_INIT;
 
   g_return_if_fail (GIMP_IS_CONTEXT (context));
+  g_return_if_fail (object == NULL || G_IS_OBJECT (object));
 
   prop = gimp_context_type_to_property (type);
 


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