diff options
author | Michael Vetter <jubalh@iodoru.org> | 2022-08-01 15:49:56 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2022-08-02 08:55:18 +0200 |
commit | 9df4bd29ea98473bd22ae122a46426c6ea391f86 (patch) | |
tree | d6da1aeeaa621b368a6d2a83a364f8581d902249 | |
parent | 0e02cc3cf6fb2ff519b1e0a8bed613d906495af4 (diff) | |
download | profani-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.c | 2 |
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); } |