diff options
Diffstat (limited to 'src/condition.c')
-rw-r--r-- | src/condition.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/condition.c b/src/condition.c index 61812c2570..b404b49c92 100644 --- a/src/condition.c +++ b/src/condition.c @@ -30,7 +30,9 @@ Condition* condition_new(ConditionType type, const char *parameter, bool trigger, bool negate) { Condition *c; - c = new0(Condition, 1); + if (!(c = new0(Condition, 1))) + return NULL; + c->type = type; c->trigger = trigger; c->negate = negate; |