Skip to content

Commit

Permalink
Fix obscure crash possibility (call stack found), some clarification
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed May 4, 2023
1 parent 9a2ca48 commit 1bd7da2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion UI/GameSettingsScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1420,7 +1420,7 @@ void GameSettingsScreen::dialogFinished(const Screen *dialog, DialogResult resul
}

void GameSettingsScreen::RecreateViews() {
oldSettingInfo_ = settingInfo_->GetText();
oldSettingInfo_ = settingInfo_ ? settingInfo_->GetText() : "N/A";
UIScreen::RecreateViews();
}

Expand Down
2 changes: 0 additions & 2 deletions UI/MemStickScreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ class MemStickScreen : public UIDialogScreenWithBackground {
UI::EventReturn OnConfirmClick(UI::EventParams &params);
UI::EventReturn OnChoiceClick(UI::EventParams &params);

SettingInfoMessage *settingInfo_ = nullptr;

bool initialSetup_;
bool storageBrowserWorking_;
bool done_ = false;
Expand Down
2 changes: 1 addition & 1 deletion UI/MiscScreens.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1114,5 +1114,5 @@ void SettingInfoMessage::Draw(UIContext &dc) {
}

std::string SettingInfoMessage::GetText() const {
return showing_ && text_ ? text_->GetText() : "";
return (showing_ && text_) ? text_->GetText() : "";
}

0 comments on commit 1bd7da2

Please sign in to comment.