|
From: Gustavo P. B. <gb...@us...> - 2006-10-11 20:36:47
|
Update of /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv30951/src/libkimageprocess Modified Files: ktcalculation.cpp Log Message: Do not crash if there is no sample neither testing images Index: ktcalculation.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess/ktcalculation.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- ktcalculation.cpp 13 Jul 2005 03:31:13 -0000 1.16 +++ ktcalculation.cpp 11 Oct 2006 20:36:39 -0000 1.17 @@ -78,6 +78,9 @@ m_inputs = KTFeatureManager::self()->enabledFeaturesCount(m_method->methodName()); m_outputs = KTImageManager::self()->sampleCount(); + if (!m_outputs) + return; + m_data.clear(); m_min.resize(m_inputs, 0); m_max.resize(m_inputs, 0); |