summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/message.c4
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;
}