From: Ian Jackson Date: Sun, 9 Jan 2011 13:31:47 +0000 (+0000) Subject: realtime: do not crash and/or recurse if die called too early X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=444b991c6aa389131e1cd3f193facdc4765bb089;p=trains.git realtime: do not crash and/or recurse if die called too early --- diff --git a/hostside/realtime.c b/hostside/realtime.c index eec52e4..e56b4cf 100644 --- a/hostside/realtime.c +++ b/hostside/realtime.c @@ -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--; }