* jni.cc (_Jv_JNI_DeleteWeakGlobalRef): Check for NULL objects.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121699
138bc75d-0d04-0410-961f-
82ee72b054a4
+2007-02-01 Marco Trudel <mtrudel@gmx.ch>
+
+ * jni.cc (_Jv_JNI_DeleteWeakGlobalRef): Check for NULL objects.
+
2007-02-07 Tom Tromey <tromey@redhat.com>
* testsuite/libjava.jni/init.c: New file.
void JNICALL
_Jv_JNI_DeleteWeakGlobalRef (JNIEnv *, jweak obj)
{
+ // JDK compatibility.
+ if (obj == NULL)
+ return;
+
using namespace gnu::gcj::runtime;
JNIWeakRef *ref = reinterpret_cast<JNIWeakRef *> (obj);
unmark_for_gc (ref, global_ref_table);