add check for lr != null to threadHoldsLock
authormotse <none@none>
Thu, 16 Dec 2004 22:13:10 +0000 (22:13 +0000)
committermotse <none@none>
Thu, 16 Dec 2004 22:13:10 +0000 (22:13 +0000)
src/threads/native/threads.c

index d7b64be0fd4f4db9edf0e04b6c135b8218f2c81e..513b48ab21059e344062b5d79caf310aeb27c35c 100644 (file)
@@ -26,7 +26,7 @@
 
    Authors: Stefan Ring
 
-   $Id: threads.c 1735 2004-12-07 14:33:27Z twisti $
+   $Id: threads.c 1768 2004-12-16 22:13:10Z motse $
 
 */
 
@@ -1053,7 +1053,7 @@ bool threadHoldsLock(threadobject *t, java_objectheader *o)
 {
        monitorLockRecord *lr = o->monitorPtr;
        GRAB_LR(lr, t);
-       return lr->o == o && lr->ownerThread == t;
+       return lr && lr->o == o && lr->ownerThread == t;
 }
 
 void interruptThread(java_lang_VMThread *thread)