Fix the segmentation fault users are having when opening the video config dialog with no games visible in the game list. Although in that case there will also not be any game profiles listed in the dropdown.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7222 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
6e4923399e
commit
9bf8a58286
|
@ -28,6 +28,7 @@ LogConfigWindow::LogConfigWindow(wxWindow* parent, CLogWindow *log_window, wxWin
|
|||
: wxPanel(parent, id, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _("Log Configuration"))
|
||||
, m_LogWindow(log_window), enableAll(true)
|
||||
{
|
||||
SetMinSize(wxSize(100, 100));
|
||||
m_LogManager = LogManager::GetInstance();
|
||||
CreateGUIControls();
|
||||
LoadSettings();
|
||||
|
|
|
@ -152,6 +152,7 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
|
|||
for (long index = GameListCtrl->GetNextItem(-1); index != -1; index = GameListCtrl->GetNextItem(index))
|
||||
{
|
||||
const GameListItem* item = GameListCtrl->GetISO(GameListCtrl->GetItemData(index));
|
||||
if (!item) continue;
|
||||
if (item->GetUniqueID() == SConfig::GetInstance().m_LocalCoreStartupParameter.m_strUniqueID)
|
||||
{
|
||||
cur_profile = index + 1;
|
||||
|
@ -168,7 +169,6 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
|
|||
vconfig.GameIniLoad((std::string(File::GetUserPath(D_GAMECONFIG_IDX)) + item->GetUniqueID() + ".ini").c_str());
|
||||
}
|
||||
|
||||
|
||||
wxNotebook* const notebook = new wxNotebook(this, -1, wxDefaultPosition, wxDefaultSize);
|
||||
|
||||
// -- GENERAL --
|
||||
|
@ -190,6 +190,7 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
|
|||
for (long index = GameListCtrl->GetNextItem(-1); index != -1; index = GameListCtrl->GetNextItem(index))
|
||||
{
|
||||
const GameListItem* item = GameListCtrl->GetISO(GameListCtrl->GetItemData(index));
|
||||
if (!item) continue;
|
||||
profile_cb->AppendString(wxString(item->GetName(0).c_str(), wxConvUTF8));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue