diff options
author | Keith Packard <keithp@keithp.com> | 2010-07-29 10:24:09 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-07-29 10:24:09 -0700 |
commit | e33dbbba94ce42295e9fed9f4ba7e46f9eff1517 (patch) | |
tree | a52e8fad19c221461411480ca2053bc82b3c066e | |
parent | d0fd53bdab2f480cd43b6d7010c2094f4fccda91 (diff) |
altosui: check for closed serial device before reading
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | ao-tools/altosui/AltosSerial.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ao-tools/altosui/AltosSerial.java b/ao-tools/altosui/AltosSerial.java index a5566ab8..96e8b61f 100644 --- a/ao-tools/altosui/AltosSerial.java +++ b/ao-tools/altosui/AltosSerial.java @@ -51,6 +51,8 @@ public class AltosSerial implements Runnable { try { for (;;) { + if (altos == null) + break; c = libaltos.altos_getchar(altos, 0); if (Thread.interrupted()) break; |