From a8ead1f0b02aa5261289f4542a13d1110b0f5f5d Mon Sep 17 00:00:00 2001 From: "K. Lange" Date: Sun, 12 Aug 2018 20:33:08 +0900 Subject: [PATCH] fix crash when clicking out of bounds --- apps/file-browser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/file-browser.c b/apps/file-browser.c index 990e3229e8..2007a02a30 100644 --- a/apps/file-browser.c +++ b/apps/file-browser.c @@ -439,7 +439,7 @@ int main(int argc, char * argv[]) { if (me->command == YUTANI_MOUSE_EVENT_CLICK || _close_enough(me)) { struct File * f = get_file_at_offset(hilighted_offset); - if (f->type == 1) { + if (f && f->type == 1) { char tmp[1024]; sprintf(tmp,"%s/%s", last_directory, f->name); load_directory(tmp);