diff --git a/library/ComponentLabeling.cpp b/library/ComponentLabeling.cpp index 5495693..e83682a 100644 --- a/library/ComponentLabeling.cpp +++ b/library/ComponentLabeling.cpp @@ -454,6 +454,7 @@ myCompLabelerGroup::~myCompLabelerGroup() void myCompLabelerGroup::set( int nThreads, Mat binIm ) { + CV_Assert(nThreads > 0); this->numThreads=nThreads; if(binIm.isContinuous()){ this->img=binIm;