From 6ac826730c56cacf357adeea17739ac620c86803 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 4 Apr 2015 13:32:20 +0200 Subject: fixed segfault on worker termination --- src/worker.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/worker.c b/src/worker.c index 2885400..497a8c4 100644 --- a/src/worker.c +++ b/src/worker.c @@ -204,7 +204,9 @@ static void watch_child( GPid pid, gint status, gpointer *data ) GError *error = NULL; char *exit_message = ""; if( g_spawn_check_exit_status( status, &error ) ) { - exit_message = error->message; + if( error != NULL ) { + exit_message = error->message; + } } printf( "Worker child with PID " PRIgid " terminated with status %d: %s.\n", -- cgit v1.2.3-54-g00ecf