]> sigrok.org Git - sigrok-cli.git/commitdiff
Minor fix that makes Clang Static Analyzer stop complaining
authorAleksander Alekseev <redacted>
Wed, 2 May 2018 12:30:41 +0000 (15:30 +0300)
committerUwe Hermann <redacted>
Thu, 3 May 2018 13:23:04 +0000 (15:23 +0200)
session.c

index 4a3878a57507c1c81c6202f99e39907172b17fb5..60f253f766d7f4a01e101608452c934abeb2528f 100644 (file)
--- a/session.c
+++ b/session.c
@@ -577,6 +577,12 @@ void run_session(void)
                }
        }
 
+       /* This is unlikely to happen but it makes static analyzers stop complaining. */
+       if (!devices) {
+               g_critical("No real devices found.");
+               return;
+       }
+
        sdi = devices->data;
        g_slist_free(devices);
        g_slist_free(real_devices);