diff --git a/ui/xui/main-menu.cc b/ui/xui/main-menu.cc index 4d174102c7..a255cd7dc1 100644 --- a/ui/xui/main-menu.cc +++ b/ui/xui/main-menu.cc @@ -944,8 +944,8 @@ void MainMenuSnapshotsView::Draw() } ImGui::SameLine(); - if (ImGui::Button(snapshot_with_create_name_exists ? "Save" : "Create") && !m_create_buf.empty()) { - xemu_snapshots_save(m_create_buf.c_str(), NULL); + if (ImGui::Button(snapshot_with_create_name_exists ? "Save" : "Create")) { + xemu_snapshots_save(m_create_buf.empty() ? NULL : m_create_buf.c_str(), NULL); m_create_buf.clear(); }