mirror of https://github.com/BOINC/boinc.git
Merge pull request #4808 from AenBleidd/vko_4793_proper_frame_delete
[Windows][Manager] Do proper verifications when saving state on application exit
This commit is contained in:
commit
4b08c5d194
|
@ -624,17 +624,24 @@ bool CViewWork::OnSaveState(wxConfigBase* pConfig) {
|
|||
wxASSERT(m_pTaskPane);
|
||||
wxASSERT(m_pListPane);
|
||||
|
||||
if (!m_pTaskPane->OnSaveState(pConfig)) {
|
||||
if (!pConfig) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_pTaskPane || !m_pTaskPane->OnSaveState(pConfig)) {
|
||||
bReturnValue = false;
|
||||
}
|
||||
if (!m_pListPane->OnSaveState(pConfig)) {
|
||||
if (!m_pListPane || !m_pListPane->OnSaveState(pConfig)) {
|
||||
bReturnValue = false;
|
||||
}
|
||||
|
||||
wxString strBaseConfigLocation = wxEmptyString;
|
||||
strBaseConfigLocation = wxT("/Tasks");
|
||||
if (pConfig && pDoc) {
|
||||
const wxString strBaseConfigLocation = wxT("/Tasks");
|
||||
pConfig->SetPath(strBaseConfigLocation);
|
||||
pConfig->Write(wxT("ActiveTasksOnly"), (pDoc->m_ActiveTasksOnly ? 1 : 0));
|
||||
} else {
|
||||
bReturnValue = false;
|
||||
}
|
||||
|
||||
return bReturnValue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue