Skip to content

Commit d0bc682

Browse files
committed
Espresso: JDWP: Check if the owner thread is null before trying to convert it.
1 parent 5b4716d commit d0bc682

File tree

1 file changed

+4
-1
lines changed
  • espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/runtime

1 file changed

+4
-1
lines changed

espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/runtime/JDWPContextImpl.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,10 @@ public CallFrame locateObjectWaitFrame() {
666666
public Object getMonitorOwnerThread(Object object) {
667667
if (object instanceof StaticObject) {
668668
EspressoLock lock = ((StaticObject) object).getLock(context);
669-
return asGuestThread(lock.getOwnerThread());
669+
Thread ownerThread = lock.getOwnerThread();
670+
if (ownerThread != null) {
671+
return asGuestThread(ownerThread);
672+
}
670673
}
671674
return null;
672675
}

0 commit comments

Comments
 (0)