summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2020-12-16 18:18:10 -0500
committer AJR <ajrhacker@users.noreply.github.com>2020-12-16 18:18:20 -0500
commitb9ad748de649c0791bd132ddcc24d177e1eccdad (patch)
treec794e69ddedafcbeabb370aae242e8729d218d2f /src/frontend
parent4f70f2d58b63e1c41f966a35808eb66db7b91040 (diff)
ui/filemngr.cpp: Fix crash with unmounted images
Diffstat (limited to 'src/frontend')
-rw-r--r--src/frontend/mame/ui/filemngr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/frontend/mame/ui/filemngr.cpp b/src/frontend/mame/ui/filemngr.cpp
index 2face5b6dd1..69a3b5ca5fa 100644
--- a/src/frontend/mame/ui/filemngr.cpp
+++ b/src/frontend/mame/ui/filemngr.cpp
@@ -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);
}