MGR: Fix assert when all_projects_list.xml file is missing

This commit is contained in:
Charlie Fenton 2013-02-06 04:33:54 -08:00 committed by Oliver Bock
parent 20e7f9867e
commit ea1123cad6
1 changed files with 6 additions and 4 deletions

View File

@ -461,10 +461,12 @@ void CProjectInfoPage::OnProjectCategorySelected( wxCommandEvent& WXUNUSED(event
}
// Set the first item to be the selected item and then pop the next event.
m_pProjectsCtrl->SetSelection(0);
wxCommandEvent evtEvent(wxEVT_COMMAND_LISTBOX_SELECTED, ID_PROJECTS);
ProcessEvent(evtEvent);
if (m_pProjectsCtrl->GetCount() > 0) {
m_pProjectsCtrl->SetSelection(0);
wxCommandEvent evtEvent(wxEVT_COMMAND_LISTBOX_SELECTED, ID_PROJECTS);
ProcessEvent(evtEvent);
}
wxLogTrace(wxT("Function Start/End"), wxT("CProjectInfoPage::OnProjectCategorySelected - Function End"));
}