GUI: Store title String instead of unsafe pointer

This commit is contained in:
SupSuper 2018-12-01 00:12:39 +00:00 committed by Thierry Crozat
parent ac957852c8
commit 7552b0c008
2 changed files with 3 additions and 2 deletions

View File

@ -89,7 +89,7 @@ int BrowserDialog::runModal() {
Common::DialogManager *dialogManager = g_system->getDialogManager();
if (dialogManager) {
if (ConfMan.getBool("gui_browser_native", Common::ConfigManager::kApplicationDomain)) {
Common::DialogManager::DialogResult result = dialogManager->showFileBrowser(_title, _choice, _isDirBrowser);
Common::DialogManager::DialogResult result = dialogManager->showFileBrowser(_title.c_str(), _choice, _isDirBrowser);
if (result != Common::DialogManager::kDialogError) {
return result;
}

View File

@ -25,6 +25,7 @@
#include "gui/dialog.h"
#include "common/fs.h"
#include "common/str.h"
namespace GUI {
@ -53,7 +54,7 @@ protected:
CheckboxWidget *_showHiddenWidget;
Common::FSNode _choice;
const char *_title;
Common::String _title;
bool _isDirBrowser;
void updateListing();