diff --git a/checkin_notes b/checkin_notes index 58dfa13709..4d599a6cbd 100755 --- a/checkin_notes +++ b/checkin_notes @@ -4685,3 +4685,11 @@ Charlie 10 May 2007 ViewResources.cpp common/ wxPieCtrl.cpp + +Rom 10 May 2007 + - Possible fix for a crashing condition when the manager is shutdown + from the system tray icon. + + clientgui/ + BOINCBaseFrame.cpp + BOINCTaskBar.cpp, .h diff --git a/clientgui/BOINCBaseFrame.cpp b/clientgui/BOINCBaseFrame.cpp index 2c4bcaf405..f2691ae34d 100644 --- a/clientgui/BOINCBaseFrame.cpp +++ b/clientgui/BOINCBaseFrame.cpp @@ -309,7 +309,7 @@ void CBOINCBaseFrame::OnExit(wxCommandEvent& WXUNUSED(event)) { // TaskBarIcon isn't used in Linux #if defined(__WXMSW__) || defined(__WXMAC__) CTaskBarIcon* pTBI = wxGetApp().GetTaskBarIcon(); - if (pTBI) + if (pTBI && !pTBI->m_bTaskbarInitiatedShutdown) delete pTBI; #endif Close(true); diff --git a/clientgui/BOINCTaskBar.cpp b/clientgui/BOINCTaskBar.cpp index 1bd7ecb8ed..20cdfae701 100644 --- a/clientgui/BOINCTaskBar.cpp +++ b/clientgui/BOINCTaskBar.cpp @@ -85,6 +85,7 @@ CTaskBarIcon::CTaskBarIcon(wxString title, wxIcon* icon, wxIcon* iconDisconnecte m_iconTaskBarDisconnected = *iconDisconnected; m_iconTaskBarSnooze = *iconSnooze; m_strDefaultTitle = title; + m_bTaskbarInitiatedShutdown = false; m_dtLastHoverDetected = wxDateTime((time_t)0); m_dtLastBalloonDisplayed = wxDateTime((time_t)0); @@ -116,6 +117,7 @@ void CTaskBarIcon::OnClose(wxCloseEvent& event) { wxLogTrace(wxT("Function Start/End"), wxT("CTaskBarIcon::OnClose - Function Begin")); ResetTaskBar(); + m_bTaskbarInitiatedShutdown = true; CBOINCBaseFrame* pFrame = wxGetApp().GetFrame(); if (pFrame) { diff --git a/clientgui/BOINCTaskBar.h b/clientgui/BOINCTaskBar.h index ffd6848478..f9f4f3d5f0 100644 --- a/clientgui/BOINCTaskBar.h +++ b/clientgui/BOINCTaskBar.h @@ -77,6 +77,7 @@ public: wxIcon m_iconTaskBarDisconnected; wxIcon m_iconTaskBarSnooze; wxString m_strDefaultTitle; + bool m_bTaskbarInitiatedShutdown; private: wxDateTime m_dtLastHoverDetected;