]> sigrok.org Git - libsigrok.git/commitdiff
chronovu-la8: don't try to clean up unless we've initialized
authorBert Vermeulen <redacted>
Thu, 2 Aug 2012 19:54:21 +0000 (21:54 +0200)
committerBert Vermeulen <redacted>
Fri, 3 Aug 2012 09:29:00 +0000 (11:29 +0200)
hardware/chronovu-la8/api.c

index aa438ff91fbc4ea9637d04b6e6be152fe83e58dc..7d64176c72f730fb73e18c1d35708ccee9c7a9f3 100644 (file)
@@ -270,6 +270,9 @@ static int hw_dev_close(struct sr_dev_inst *sdi)
 static int hw_cleanup(void)
 {
 
+       if (!cdi->priv)
+               return SR_OK;
+
        clear_instances();
 
        return SR_OK;