summaryrefslogtreecommitdiffstats
path: root/gtk/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/src/main.c')
-rw-r--r--gtk/src/main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gtk/src/main.c b/gtk/src/main.c
index c0abea34b..0cf616f74 100644
--- a/gtk/src/main.c
+++ b/gtk/src/main.c
@@ -625,8 +625,11 @@ IoRedirect(signal_user_data_t *ud)
g_free(str);
g_free(path);
g_free(config);
- // Set encoding to raw.
- g_io_channel_set_encoding(ud->activity_log, NULL, NULL);
+ if (ud->activity_log != NULL)
+ {
+ // Set encoding to raw.
+ g_io_channel_set_encoding(ud->activity_log, NULL, NULL);
+ }
// redirect stderr to the writer end of the pipe
#if defined(_WIN32)