]> sigrok.org Git - libsigrok.git/commitdiff
Fix #550 by allowing an empty trigger match list
authorSoeren Apel <redacted>
Tue, 8 Sep 2015 17:09:54 +0000 (19:09 +0200)
committerSoeren Apel <redacted>
Tue, 8 Sep 2015 17:09:54 +0000 (19:09 +0200)
1e7659609bddd40471faf9a8e81ee7554d77dce9 is related
to this change and required to fix #550 as well.

src/trigger.c

index 34474982b678de0bc5144a5553f7a0b51a3c65ed..4b95a5a1d7fea8336e9fb1994d0906d716b33ab2 100644 (file)
@@ -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);