mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-01 03:57:17 +01:00
DevTools: Don't touch a deleted view when the trace file is picked
The save dialog's callback set the path on a stored InfoItem pointer. If the views were recreated while the dialog was open, that view was gone. Recreate the views instead, which reads the path from the tracer. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
37be6ce4e8
commit
b530b477f7
2 files changed
+3
-6
No files matched your search
@@ -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();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user