summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/control/Script.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index 934571ef..40bbd0cf 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -1356,7 +1356,8 @@ static void PrintToLog(const char* format, ...)
printf("%s", tmp);
#if SCRIPT_LOG_FILE_LEVEL == 1 || SCRIPT_LOG_FILE_LEVEL == 2
- fwrite(tmp, 1, strlen(tmp), dbg_log);
+ if (dbg_log)
+ fwrite(tmp, 1, strlen(tmp), dbg_log);
#endif
}