[java-atk-wrapper] JNI check g_object is not null before ref



commit be87bd1daa8046ee37b174d1d99a2f7ea9255e93
Author: Magdalen Berns <m berns thismagpie com>
Date:   Mon Jun 15 18:34:20 2015 +0100

    JNI check g_object is not null before ref
    
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=751009

 jni/src/jawtable.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/jni/src/jawtable.c b/jni/src/jawtable.c
index eb82114..a44d027 100644
--- a/jni/src/jawtable.c
+++ b/jni/src/jawtable.c
@@ -153,7 +153,8 @@ jaw_table_ref_at (AtkTable *table, gint     row, gint column)
 
        JawImpl* jaw_impl = jaw_impl_get_instance( jniEnv, jac );
 
-       g_object_ref( G_OBJECT(jaw_impl) );
+  if (G_OBJECT(jaw_impl) != NULL)
+    g_object_ref(G_OBJECT(jaw_impl));
 
        return ATK_OBJECT(jaw_impl);
 }


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