summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index 5ef7768..8dcbb65 100644
--- a/src/util.c
+++ b/src/util.c
@@ -340,7 +340,7 @@ gchar *make_error_message(JsonObject * response, int status)
{
if (status == FAIL_JSON_DECODE) {
return g_strdup(_("JSON decoding error."));
- } else if (status == FAIL_RESPONSE_UNSUCCESSFUL) {
+ } else if (response && status == FAIL_RESPONSE_UNSUCCESSFUL) {
const gchar *resultStr =
json_object_get_string_member(response, "result");
if (resultStr == NULL)