diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-09-28 13:33:38 +0200 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-09-28 13:33:38 +0200 |
commit | c7af5a0a0fabbd70ecadafb75cf7d8c0a9b9a9ed (patch) | |
tree | 1e043218985113a3c2d647f0a652d052dca443e6 | |
parent | 4b786cf0be8e968542f0b4b783cf2b8ebb44789a (diff) | |
download | cmumble-c7af5a0a0fabbd70ecadafb75cf7d8c0a9b9a9ed.tar.gz cmumble-c7af5a0a0fabbd70ecadafb75cf7d8c0a9b9a9ed.tar.bz2 cmumble-c7af5a0a0fabbd70ecadafb75cf7d8c0a9b9a9ed.zip |
message: Fix segfault when error is Null but ret <= 0
-rw-r--r-- | src/message.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/message.c b/src/message.c index c29b8d8..a7da5da 100644 --- a/src/message.c +++ b/src/message.c @@ -97,7 +97,9 @@ cmumble_recv_msg(struct cmumble_context *ctx) return 0; } - g_printerr("read failed: %ld: %d %s\n", ret, error->code, error->message); + g_printerr("read failed: %ld: %d %s\n", ret, + error ? error->code : -1, + error ? error->message: "unknown"); return 0; } |