only set console when we have a console

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6535 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2007-12-06 13:40:00 +00:00
parent 8a01509d13
commit 18ca278d9b
4 changed files with 13 additions and 9 deletions

View File

@@ -247,7 +247,9 @@ SWITCH_DECLARE(void) switch_log_printf(switch_text_channel_t channel, const char
}
} else {
if (level == SWITCH_LOG_CONSOLE || !LOG_QUEUE || !THREAD_RUNNING) {
fprintf(handle, "%s", data);
if (handle) {
fprintf(handle, "%s", data);
}
free(data);
} else if (level <= MAX_LEVEL) {
switch_log_node_t *node;