From: srn Date: Thu, 14 Dec 2006 14:52:58 +0000 (+0000) Subject: Fixed method NewComponent, added check for empty DataType. Now it's impossible to... X-Git-Tag: SALOMEDS_UnitTests_1_2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8cf00d328468b9abf635ea938d1c41b423136146;p=modules%2Fkernel.git Fixed method NewComponent, added check for empty DataType. Now it's impossible to create component with empty DataType --- diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_StudyBuilder.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_StudyBuilder.cxx index 7b6e40fb8..f963a80c4 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_StudyBuilder.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_StudyBuilder.cxx @@ -81,6 +81,9 @@ Handle(SALOMEDSImpl_SComponent) SALOMEDSImpl_StudyBuilder::NewComponent(const TC { _errorCode = ""; CheckLocked(); + + if(DataType.Length() == 0) return 0; + //Always create component under main label. TDF_Label L = _doc->Main();