fixed coredump with taskwarrior 2.0.0 which does not reply with an empty array but
[ptask.git] / src / tw.c
index df73030..5ec2bc4 100644 (file)
--- a/src/tw.c
+++ b/src/tw.c
@@ -153,6 +153,9 @@ static struct json_object *task_exec_json(const char *opts)
 
        free(cmd);
 
+       if (o && is_error(o))
+               return NULL;
+
        return o;
 }