diff --git a/hardware/serial-dmm/api.c b/hardware/serial-dmm/api.c index 8a2d7be2..be240e23 100644 --- a/hardware/serial-dmm/api.c +++ b/hardware/serial-dmm/api.c @@ -151,6 +151,10 @@ static int clear_instances(void) struct dev_context *devc; GSList *l; + /* di is not necessarily initialized */ + if (!di) + return SR_OK; + if (!(drvc = di->priv)) return SR_OK;