]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Fixed method NewComponent, added check for empty DataType. Now it's impossible to... SALOMEDS_UnitTests_1_2
authorsrn <srn@opencascade.com>
Thu, 14 Dec 2006 14:52:58 +0000 (14:52 +0000)
committersrn <srn@opencascade.com>
Thu, 14 Dec 2006 14:52:58 +0000 (14:52 +0000)
src/SALOMEDSImpl/SALOMEDSImpl_StudyBuilder.cxx

index 7b6e40fb8199a2c8e24e1b2802f4b4864751fa11..f963a80c4257e22d357823edba55079e3905b965 100644 (file)
@@ -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();