From e33dbbba94ce42295e9fed9f4ba7e46f9eff1517 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 29 Jul 2010 10:24:09 -0700 Subject: [PATCH] altosui: check for closed serial device before reading Signed-off-by: Keith Packard --- ao-tools/altosui/AltosSerial.java | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.30.2