mirror of
https://github.com/corda/corda.git
synced 2025-01-22 12:28:11 +00:00
handle null p->javaThread in addThread and removeThread
These functions may be called when p->javaThread is null, in which case we must not try to set the threadPeer field.
This commit is contained in:
parent
6461e0a1af
commit
86c48f3ff6
@ -1973,7 +1973,9 @@ addThread(Thread* t, Thread* p)
|
||||
p->peer = p->parent->child;
|
||||
p->parent->child = p;
|
||||
|
||||
threadPeer(t, p->javaThread) = reinterpret_cast<jlong>(p);
|
||||
if (p->javaThread) {
|
||||
threadPeer(t, p->javaThread) = reinterpret_cast<jlong>(p);
|
||||
}
|
||||
}
|
||||
|
||||
inline void
|
||||
@ -1989,7 +1991,9 @@ removeThread(Thread* t, Thread* p)
|
||||
|
||||
p->parent->child = p->peer;
|
||||
|
||||
threadPeer(t, p->javaThread) = 0;
|
||||
if (p->javaThread) {
|
||||
threadPeer(t, p->javaThread) = 0;
|
||||
}
|
||||
}
|
||||
|
||||
inline Thread*
|
||||
|
Loading…
Reference in New Issue
Block a user