From f951f3835f81ff1deeef1e9d56e861db2c61924a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Orsini Date: Fri, 18 Apr 2014 14:59:53 +0200 Subject: [PATCH] fixed coredump with taskwarrior 2.0.0 which does not reply with an empty array but an invalid json when there is no tasks --- src/tw.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tw.c b/src/tw.c index df73030..5ec2bc4 100644 --- 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; } -- 2.7.4