diff --git a/std.c b/std.c index 8add0d3d..fe089346 100644 --- a/std.c +++ b/std.c @@ -184,7 +184,10 @@ SR_PRIV int std_dev_clear(const struct sr_dev_driver *driver, GSList *l; int ret; - drvc = driver->priv; + if (!(drvc = driver->priv)) + /* Driver was never initialized, nothing to do. */ + return SR_OK; + ret = SR_OK; for (l = drvc->instances; l; l = l->next) { /* Log errors, but continue cleaning up the rest. */