From: Keith Packard Date: Thu, 29 Jul 2010 17:24:09 +0000 (-0700) Subject: altosui: check for closed serial device before reading X-Git-Tag: debian/0.6+290+g7877496~12 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=e33dbbba94ce42295e9fed9f4ba7e46f9eff1517 altosui: check for closed serial device before reading Signed-off-by: Keith Packard --- 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;