From 95a386f2a6c3ead192b0135a144c6c047bf94a7d Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 1 Apr 2008 16:40:53 -0600 Subject: [PATCH] handle null values in IsSameObject --- src/jnienv.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/jnienv.cpp b/src/jnienv.cpp index a87e4e8942..c9f983bdef 100644 --- a/src/jnienv.cpp +++ b/src/jnienv.cpp @@ -1805,9 +1805,13 @@ GetJavaVM(Thread* t, Machine** m) jboolean JNICALL IsSameObject(Thread* t, jobject a, jobject b) { - ENTER(t, Thread::ActiveState); + if (a and b) { + ENTER(t, Thread::ActiveState); - return *a == *b; + return *a == *b; + } else { + return a == b; + } } struct JDK1_1InitArgs {