From: Bert Vermeulen Date: Thu, 2 Aug 2012 19:54:21 +0000 (+0200) Subject: chronovu-la8: don't try to clean up unless we've initialized X-Git-Tag: dsupstream~745 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=cf1ebd544652274923e808c93f7e88292acc2f11;p=libsigrok.git chronovu-la8: don't try to clean up unless we've initialized --- diff --git a/hardware/chronovu-la8/api.c b/hardware/chronovu-la8/api.c index aa438ff9..7d64176c 100644 --- a/hardware/chronovu-la8/api.c +++ b/hardware/chronovu-la8/api.c @@ -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;