From: Soeren Apel Date: Tue, 8 Sep 2015 17:09:54 +0000 (+0200) Subject: Fix #550 by allowing an empty trigger match list X-Git-Tag: libsigrok-0.4.0~323 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=42f4619d6b436e1db7685692281ae60999527106;p=libsigrok.git Fix #550 by allowing an empty trigger match list 1e7659609bddd40471faf9a8e81ee7554d77dce9 is related to this change and required to fix #550 as well. --- diff --git a/src/trigger.c b/src/trigger.c index 34474982..4b95a5a1 100644 --- a/src/trigger.c +++ b/src/trigger.c @@ -80,7 +80,9 @@ SR_API void sr_trigger_free(struct sr_trigger *trig) for (l = trig->stages; l; l = l->next) { stage = l->data; - g_slist_free_full(stage->matches, g_free); + + if (stage->matches) + g_slist_free_full(stage->matches, g_free); } g_slist_free_full(trig->stages, g_free);