From a372a83f4d1abb6ad6cca90f6ceb108cb4d7664a Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 16 Dec 2009 15:18:38 -0800 Subject: Don't crash on invalid file --- src/displaywindow.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/displaywindow.c b/src/displaywindow.c index bb524093..52de25d8 100644 --- a/src/displaywindow.c +++ b/src/displaywindow.c @@ -759,8 +759,7 @@ DisplayWindow *displaywindow_open(const char *filename) if ( dw->hdfile == NULL ) { fprintf(stderr, "Couldn't open file '%s'\n", filename); displaywindow_disable(dw); - } - if ( hdfile_set_image(dw->hdfile, "/data/data") ) { + } else if ( hdfile_set_image(dw->hdfile, "/data/data") ) { fprintf(stderr, "Couldn't select path\n"); displaywindow_disable(dw); } -- cgit v1.2.3