about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2022-08-01 15:49:56 +0200
committerMichael Vetter <jubalh@iodoru.org>2022-08-02 08:55:18 +0200
commit9df4bd29ea98473bd22ae122a46426c6ea391f86 (patch)
treed6da1aeeaa621b368a6d2a83a364f8581d902249
parent0e02cc3cf6fb2ff519b1e0a8bed613d906495af4 (diff)
downloadprofani-tty-9df4bd29ea98473bd22ae122a46426c6ea391f86.tar.gz
Check for error before trying to append it
Related to https://github.com/profanity-im/profanity/issues/1738
-rw-r--r--src/common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common.c b/src/common.c
index 3a1b9cc4..be010d8d 100644
--- a/src/common.c
+++ b/src/common.c
@@ -465,7 +465,7 @@ call_external(gchar** argv, gchar** std_out, gchar** std_err)
     if (!spawn_result
         || !g_spawn_check_exit_status(exit_status, &spawn_error)) {
         gchar* cmd = g_strjoinv(" ", argv);
-        log_error("Spawning '%s' failed with '%s'.", cmd, spawn_error->message);
+        log_error("Spawning '%s' failed with '%s'.", cmd, (spawn_error && spawn_error->message) ? spawn_error->message : "No error given");
         g_free(cmd);
         g_error_free(spawn_error);
     }