Stuff like
./bin/sigrok-cli -i rnd.dd -a transitioncounter
would segfault (rnd.dd consists of random bytes) because device->plugin
was NULL and was being dereferenced.
Thanks Olivier Fauchon <redacted> for reporting.
{
int *capabilities, i;
+ if (!device || !device->plugin)
+ return;
+
if ((capabilities = device->plugin->get_capabilities()))
for (i = 0; capabilities[i]; i++)
if (capabilities[i] == hwcap)