aboutsummaryrefslogtreecommitdiffstats
path: root/common/logging.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--common/logging.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/logging.c b/common/logging.c
index f014d9fca..f9ac69202 100644
--- a/common/logging.c
+++ b/common/logging.c
@@ -402,7 +402,11 @@ log_get_fd ()
estream_t
log_get_stream ()
{
- assert (logstream);
+ if (!logstream)
+ {
+ log_set_file (NULL); /* Make sure a log stream has been set. */
+ assert (logstream);
+ }
return logstream;
}