From: <da...@us...> - 2007-12-11 17:18:01
|
Revision: 2561 http://hugin.svn.sourceforge.net/hugin/?rev=2561&view=rev Author: dangelo Date: 2007-12-11 09:17:59 -0800 (Tue, 11 Dec 2007) Log Message: ----------- fixed possible crash in progress reporter (thanks to Tom Sharpless for the hint) Modified Paths: -------------- hugin/trunk/src/hugin_base/appbase/ProgressDisplayOld.cpp Modified: hugin/trunk/src/hugin_base/appbase/ProgressDisplayOld.cpp =================================================================== --- hugin/trunk/src/hugin_base/appbase/ProgressDisplayOld.cpp 2007-12-11 17:08:27 UTC (rev 2560) +++ hugin/trunk/src/hugin_base/appbase/ProgressDisplayOld.cpp 2007-12-11 17:17:59 UTC (rev 2561) @@ -147,7 +147,10 @@ /// void MultiProgressDisplayAdaptor::taskAdded() { - o_progressDisplay.setParentProgressOfNewSubtasks(( ++(tasks.rbegin()) )->subStepProgress, true); + assert(tasks.size() > 0); + if (tasks.size() > 1) { + o_progressDisplay.setParentProgressOfNewSubtasks(( ++(tasks.rbegin()) )->subStepProgress, true); + } o_progressDisplay.startSubtask(tasks.back().getMessage(), 1.0); }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |