ui/filemngr.cpp: Fix crash with unmounted images

This commit is contained in:
AJR 2020-12-16 18:18:10 -05:00
parent 4f70f2d58b
commit b9ad748de6

View File

@ -60,7 +60,7 @@ menu_file_manager::~menu_file_manager()
void menu_file_manager::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
{
// access the path
std::string_view path = selected_device ? selected_device->filename() : std::string_view();
std::string_view path = selected_device && selected_device->exists() ? selected_device->filename() : std::string_view();
extra_text_render(top, bottom, origx1, origy1, origx2, origy2, std::string_view(), path);
}