jni.cc (_Jv_JNI_DeleteWeakGlobalRef): Check for NULL objects.
2007-02-01 Marco Trudel <mtrudel@gmx.ch> * jni.cc (_Jv_JNI_DeleteWeakGlobalRef): Check for NULL objects. From-SVN: r121699
This commit is contained in:
parent
0ccadf458d
commit
304237321b
@ -1,3 +1,7 @@
|
||||
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.
|
||||
|
@ -1750,6 +1750,10 @@ _Jv_JNI_NewWeakGlobalRef (JNIEnv *env, jobject obj)
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user