]> git.zerfleddert.de Git - rigol/commitdiff
don't try to build an image with broken data
authorMichael Gernoth <michael@gernoth.net>
Sun, 6 Jun 2010 19:00:27 +0000 (21:00 +0200)
committerMichael Gernoth <michael@gernoth.net>
Sun, 6 Jun 2010 19:00:27 +0000 (21:00 +0200)
commands.c

index cb8dd6d2d59f4aa9473d1d684b597a608f8fb081..1b243a2ed41392f448bc8e51dbde4cf9b16721bc 100644 (file)
@@ -123,6 +123,7 @@ unsigned char* get_lcd(struct scope *sc, int *imglen, int keylock)
 
        if (l != sizeof(screen)) {
                printf ("hmm. didnt' get %d bytes, but %d\n\n", (int)sizeof(screen), l); 
 
        if (l != sizeof(screen)) {
                printf ("hmm. didnt' get %d bytes, but %d\n\n", (int)sizeof(screen), l); 
+               return NULL;
        }
 
        png = lcd2png(screen, imglen);
        }
 
        png = lcd2png(screen, imglen);
Impressum, Datenschutz