diff --git a/UI/DeveloperToolsScreen.cpp b/UI/DeveloperToolsScreen.cpp index 38e1c9471e..abead2fb46 100644 --- a/UI/DeveloperToolsScreen.cpp +++ b/UI/DeveloperToolsScreen.cpp @@ -350,8 +350,7 @@ void DeveloperToolsScreen::CreateMIPSTracerTab(UI::LinearLayout *list) { return true; }); - MIPSTracerPath_ = mipsTracer.get_logging_path(); - MIPSTracerPath = list->Add(new InfoItem(dev->T("Current log file"), MIPSTracerPath_)); + list->Add(new InfoItem(dev->T("Current log file"), mipsTracer.get_logging_path())); PopupSliderChoice* storage_capacity = list->Add( new PopupSliderChoice( @@ -771,8 +770,8 @@ void DeveloperToolsScreen::OnMIPSTracerPathChanged(UI::EventParams &e) { BrowseFileType::ANY, [this](std::string_view value, int) { mipsTracer.set_logging_path(std::string(value)); - MIPSTracerPath_ = value; - MIPSTracerPath->SetRightText(MIPSTracerPath_); + // The views may have been recreated while the dialog was open, so don't keep a pointer to the path view. + RecreateViews(); } ); } diff --git a/UI/DeveloperToolsScreen.h b/UI/DeveloperToolsScreen.h index 0eb1a025ee..be5720f9f4 100644 --- a/UI/DeveloperToolsScreen.h +++ b/UI/DeveloperToolsScreen.h @@ -53,8 +53,6 @@ private: HasIni hasTexturesIni_ = HasIni::MAYBE; bool MIPSTracerEnabled_ = false; - std::string MIPSTracerPath_ = ""; - UI::InfoItem* MIPSTracerPath = nullptr; int testSliderValue_ = 0; bool pretendIngame_ = false;