diff options
author | Thomas White <taw@bitwiz.org.uk> | 2009-12-16 15:18:38 -0800 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2009-12-16 15:18:38 -0800 |
commit | a372a83f4d1abb6ad6cca90f6ceb108cb4d7664a (patch) | |
tree | 08e259d33a98d6bf4647d3fd555b7f8394634762 | |
parent | 90215e60340c2497fffee3598e4aba9439606326 (diff) |
Don't crash on invalid file
-rw-r--r-- | src/displaywindow.c | 3 |
1 files changed, 1 insertions, 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); } |