From 30317e0ffd040607c97c8cfa8f98e790c41287b7 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Thu, 6 Jan 2005 22:57:28 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=5009 --- checkin_notes | 4 ++++ clientgui/BOINCBaseView.cpp | 9 +++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/checkin_notes b/checkin_notes index d1518a485d..04a0220cfa 100755 --- a/checkin_notes +++ b/checkin_notes @@ -22130,6 +22130,10 @@ Rom 6 Jan 2005 framework to do this, but the call to wxProcess::Exists causes an assert on Windows if the process doesn't exist. And sometimes crashes in a release build. + - Bug Fix: When syncing the views cache make sure there is at least + one item to syncronize, otherwise we'll reference a NULL pointer + and blow up. This fixes the crashing bug when you startup and + shutdown the core client in the background. client/win/ wingui_mainwindow.cpp diff --git a/clientgui/BOINCBaseView.cpp b/clientgui/BOINCBaseView.cpp index 09d2b74772..1fce7a29e9 100644 --- a/clientgui/BOINCBaseView.cpp +++ b/clientgui/BOINCBaseView.cpp @@ -229,14 +229,15 @@ void CBOINCBaseView::OnListRender ( wxTimerEvent& event ) } } - m_pListPane->SetItemCount(iDocCount); + m_pListPane->SetItemCount( iDocCount ); } } - SyncronizeCache(); + if ( iCacheCount ) + SyncronizeCache(); - if (EnsureLastItemVisible()) - m_pListPane->EnsureVisible(iDocCount); + if ( EnsureLastItemVisible() ) + m_pListPane->EnsureVisible( iDocCount ); m_bProcessingListRenderEvent = false; }