Obvious jni weak reference fix
From-SVN: r47128
This commit is contained in:
parent
089a05b8d7
commit
aee4201707
2 changed files with 5 additions and 1 deletions
|
@ -212,7 +212,7 @@ unwrap (T *obj)
|
|||
using namespace gnu::gcj::runtime;
|
||||
// We can compare the class directly because JNIWeakRef is `final'.
|
||||
// Doing it this way is much faster.
|
||||
if (obj == NULL || obj->getClass () == &JNIWeakRef::class$)
|
||||
if (obj == NULL || obj->getClass () != &JNIWeakRef::class$)
|
||||
return obj;
|
||||
JNIWeakRef *wr = reinterpret_cast<JNIWeakRef *> (obj);
|
||||
return reinterpret_cast<T *> (wr->get ());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue