From 103270938bf679730db5120a8945efcfb79d7db4 Mon Sep 17 00:00:00 2001 From: Ole Loots Date: Sat, 21 Dec 2013 03:17:39 +0100 Subject: Check for null pointer before setting label --- atari/settings.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/atari/settings.c b/atari/settings.c index 30ad20a13..fa835bfbf 100644 --- a/atari/settings.c +++ b/atari/settings.c @@ -369,7 +369,9 @@ static bool handle_filesystem_select_button(short rsc_bt) if (require_path == false) { path = file_select(title, ""); - gemtk_obj_set_str_safe(dlgtree, rsc_te, path); + if (path != NULL) { + gemtk_obj_set_str_safe(dlgtree, rsc_te, path); + } } else { do { @@ -388,6 +390,7 @@ static bool handle_filesystem_select_button(short rsc_bt) } } + OBJ_UNCHECK(rsc_bt); OBJ_REDRAW(rsc_bt); OBJ_REDRAW(rsc_te); } -- cgit v1.2.3