Never return null from imv_navigator_selection

This fixes a crash where a null pointer would be used to set an
environment variable.

Fixes #123
This commit is contained in:
Harry Jeffery 2018-01-07 19:56:50 +00:00
parent cfafe6d963
commit a65b30b5da

View file

@ -121,7 +121,7 @@ int imv_navigator_add(struct imv_navigator *nav, const char *path,
const char *imv_navigator_selection(struct imv_navigator *nav)
{
if(nav->num_paths == 0) {
return NULL;
return "";
}
return nav->paths[nav->cur_path];
}