]> sigrok.org Git - libsigrok.git/commitdiff
output: Check options hash before destroying.
authorBert Vermeulen <redacted>
Sat, 2 Aug 2014 23:24:30 +0000 (01:24 +0200)
committerBert Vermeulen <redacted>
Sat, 2 Aug 2014 23:24:30 +0000 (01:24 +0200)
src/output/output.c

index e84183913cef7723a887b9593a260268ed70e83c..6458395371a8eba323187fe2c2e983a91df74832 100644 (file)
@@ -264,7 +264,8 @@ SR_API const struct sr_output *sr_output_new(const struct sr_output_module *o,
                g_free(op);
                op = NULL;
        }
-       g_hash_table_destroy(new_opts);
+       if (new_opts)
+               g_hash_table_destroy(new_opts);
 
        return op;
 }