STDLOG(msg);
throw KERNEL::createSalomeException(msg);
}
+ if (_params.nbContours < 1)
+ {
+ const char * mes = "Invalid number of contours!";
+ STDLOG(mes);
+ throw KERNEL::createSalomeException(mes);
+ }
setOrCreateRenderView(); // instanciate __viewXXX
updateColorMap<MEDPresentationContour, MEDCALC::ContourParameters>(params.colorMap);
if (params.nbContours != _params.nbContours)
- updateNbContours(params.nbContours);
+ {
+ if (params.nbContours < 1)
+ {
+ const char * mes = "Invalid number of contours!";
+ STDLOG(mes);
+ throw KERNEL::createSalomeException(mes);
+ }
+ updateNbContours(params.nbContours);
+ }
}
void