mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-13 10:29:35 +01:00
Fix for bug 950 -- NPE Compiler.java:407 -- also searched for any other instances & found two other cases of the same bug
This commit is contained in:
parent
958c835ef0
commit
5e75bd4a97
@ -401,12 +401,8 @@ public class Compiler implements MessageConsumer {
|
||||
boolean compiling = true;
|
||||
while (compiling) {
|
||||
try {
|
||||
Thread t = in.thread;
|
||||
if (t != null)
|
||||
t.join();
|
||||
t = err.thread;
|
||||
if (t != null)
|
||||
t.join();
|
||||
in.join();
|
||||
err.join();
|
||||
result = process.waitFor();
|
||||
//System.out.println("result is " + result);
|
||||
compiling = false;
|
||||
|
@ -85,8 +85,15 @@ public class MessageSiphon implements Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Wait until the MessageSiphon thread is complete.
|
||||
public void join() throws java.lang.InterruptedException {
|
||||
// Grab a temp copy in case another thread nulls the "thread"
|
||||
// member variable
|
||||
Thread t = thread;
|
||||
if (t != null) t.join();
|
||||
}
|
||||
|
||||
public Thread getThread() {
|
||||
return thread;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -63,10 +63,8 @@ public class Sizer implements MessageConsumer {
|
||||
|
||||
while(running) {
|
||||
try {
|
||||
if (in.thread != null)
|
||||
in.thread.join();
|
||||
if (err.thread != null)
|
||||
err.thread.join();
|
||||
in.join();
|
||||
err.join();
|
||||
r = process.waitFor();
|
||||
running = false;
|
||||
} catch (InterruptedException intExc) { }
|
||||
|
Loading…
x
Reference in New Issue
Block a user