src/messagelog.cpp

changeset 513
29eb671b34f6
parent 512
adab82ab13a5
child 514
d78fea0f664c
--- a/src/messagelog.cpp	Fri Oct 18 18:16:54 2013 +0300
+++ b/src/messagelog.cpp	Fri Oct 18 21:52:09 2013 +0300
@@ -118,8 +118,10 @@
 // -----------------------------------------------------------------------------
 void DoLog (std::initializer_list<StringFormatArg> args)
 {	const str msg = DoFormat (args);
-	g_win->addMessage (msg);
+
+	if (g_win)
+		g_win->addMessage (msg);
 
 	// Also print it to stdout
-	print ("%1\n", msg);
+	fprint (stdout, "%1", msg);
 }

mercurial