diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2015-04-04 13:32:20 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2015-04-04 13:32:20 +0200 |
commit | 6ac826730c56cacf357adeea17739ac620c86803 (patch) | |
tree | c55ebf4e9b689823c552bdabb3b17e968c97a97d /src | |
parent | 9b1d1d1d7ff1d5271491185f97348c8bcbb3ddec (diff) | |
download | biruda-6ac826730c56cacf357adeea17739ac620c86803.tar.gz biruda-6ac826730c56cacf357adeea17739ac620c86803.tar.bz2 |
fixed segfault on worker termination
Diffstat (limited to 'src')
-rw-r--r-- | src/worker.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 = "<unknown error>"; 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", |