Browse files

Fix race-induced NPE bug in EInternalPID.is_alive()

  • Loading branch information...
1 parent 5633e63 commit 19c8d055e60928b310a2eaa7789f6495fdd8be1e @eriksoe eriksoe committed Jan 29, 2014
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/main/java/erjang/EInternalPID.java
View
3 src/main/java/erjang/EInternalPID.java
@@ -72,7 +72,8 @@ public EInternalPID(EProc self) {
*/
@Override
public boolean is_alive() {
- return task != null && task.is_alive();
+ EProc task = this.task; // Take local copy
+ return task != null && task.is_alive();
}
public ELocalHandle testLocalHandle() {

0 comments on commit 19c8d05

Please sign in to comment.