chiark / gitweb /
realtime: do not crash and/or recurse if die called too early
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 9 Jan 2011 13:31:47 +0000 (13:31 +0000)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 9 Jan 2011 13:31:47 +0000 (13:31 +0000)
hostside/realtime.c

index eec52e4feb3f27223496bdc2c1b39ed1b283b5a1..e56b4cfa4e1df4f1a4bc4a8c4ca99935d73bf989 100644 (file)
@@ -232,7 +232,7 @@ void ouhex_nosim(const char *word, const Byte *command, int length) {
 
 void die_vprintf_hook(const char *fmt, va_list al) {
   static int recursing;
-  if (!recursing++)
+  if (cmdi.out.desc && !recursing++)
     ouvprintf(fmt, al);
   recursing--;
 }