]> sigrok.org Git - libsigrok.git/blobdiff - hardware/agilent-dmm/api.c
agilent-dmm: Fix SEGV during incomplete reply from meter.
[libsigrok.git] / hardware / agilent-dmm / api.c
index 34fa92ad507db894c1a96ad3558d170859404b57..4a1274d6d7885abec0284e47545f6a5310117d34 100644 (file)
@@ -129,7 +129,7 @@ static GSList *scan(GSList *options)
 
        tokens = g_strsplit(buf, ",", 4);
        if (!strcmp("Agilent Technologies", tokens[0])
-                       && tokens[2] && tokens[3]) {
+                       && tokens[1] && tokens[2] && tokens[3]) {
                for (i = 0; supported_agdmm[i].model; i++) {
                        if (strcmp(supported_agdmm[i].modelname, tokens[1]))
                                continue;