From 8cf00d328468b9abf635ea938d1c41b423136146 Mon Sep 17 00:00:00 2001 From: srn Date: Thu, 14 Dec 2006 14:52:58 +0000 Subject: [PATCH] Fixed method NewComponent, added check for empty DataType. Now it's impossible to create component with empty DataType --- src/SALOMEDSImpl/SALOMEDSImpl_StudyBuilder.cxx | 3 +++ 1 file changed, 3 insertions(+) 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(); -- 2.39.2