From: Michael Gernoth Date: Sun, 6 Jun 2010 19:00:27 +0000 (+0200) Subject: don't try to build an image with broken data X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/rigol/commitdiff_plain/20074af7567bf89b5cbc059340d97fba754e1747 don't try to build an image with broken data --- diff --git a/commands.c b/commands.c index cb8dd6d..1b243a2 100644 --- a/commands.c +++ b/commands.c @@ -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); + return NULL; } png = lcd2png(screen, imglen);