Check for null pointer before setting label

This commit is contained in:
Ole Loots 2013-12-21 03:17:39 +01:00
parent 9118f3c8cc
commit 103270938b

View File

@ -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);
}