From 4f7daa6e1ebf050b1901a2cceaed1fad62c1b509 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Wed, 23 May 2007 03:04:32 +0000 Subject: [PATCH] Manager: Fix crash bug in wxPieCtrl. svn path=/trunk/boinc/; revision=12719 --- checkin_notes | 3 +++ clientgui/common/wxPieCtrl.cpp | 2 ++ 2 files changed, 5 insertions(+) diff --git a/checkin_notes b/checkin_notes index 90dd046c11..1baaf4194a 100755 --- a/checkin_notes +++ b/checkin_notes @@ -5189,11 +5189,14 @@ David 22 May 2007 graphics2_win.C Charlie 22 May 2007 + - Manager: Fix crash bug in wxPieCtrl. - Mac: Add list control sources back into XCode Project (ViewTransfers.cpp,.h, ViewWork.cpp,.h,ViewProjects.cpp,.h) - Mac: Revert XCode project, build scripts and build instructions to use wxMac-2.6.3 as a temporary workaround to SimpleGUI drawing bug. + clientgui/ + wxPieCtrl.cpp mac_build/ buildWxMac.sh HowToBuildBOINC_XCode.rtf diff --git a/clientgui/common/wxPieCtrl.cpp b/clientgui/common/wxPieCtrl.cpp index 48835a2dd9..587837a136 100644 --- a/clientgui/common/wxPieCtrl.cpp +++ b/clientgui/common/wxPieCtrl.cpp @@ -176,6 +176,8 @@ void wxPieCtrl::GetPartAngles(wxArrayDouble & angles) { total += m_Series[i].GetValue(); } + if (total == 0.0) + return; double current(0); angles.Add(current); for(i = 0; i < m_Series.Count(); i++)