Added functions to enable reading data files from perl
[pspp-builds.git] / src / libpspp / message.c
index 695b713287b4d55096cd4ddab330d30ea7f35f03..227109145528d318f3963e7b3e295d11ef8602e9 100644 (file)
@@ -99,9 +99,11 @@ msg_destroy(struct msg *m)
 void
 msg_emit (struct msg *m)
 {
-  get_msg_location (s_stream, &m->where);
+  if ( s_stream )
+    get_msg_location (s_stream, &m->where);
+
   if (!messages_disabled)
-    msg_handler (m);
+     msg_handler (m);
   free (m->text);
 }