From: rnv Date: Fri, 20 Jan 2017 10:00:50 +0000 (+0300) Subject: Fix crash in hasAnnotations() method X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fapl%2F22873;p=modules%2Fgeom.git Fix crash in hasAnnotations() method --- diff --git a/src/GEOMGUI/GEOMGUI_AnnotationAttrs.cxx b/src/GEOMGUI/GEOMGUI_AnnotationAttrs.cxx index 081fb7341..1a09b5024 100755 --- a/src/GEOMGUI/GEOMGUI_AnnotationAttrs.cxx +++ b/src/GEOMGUI/GEOMGUI_AnnotationAttrs.cxx @@ -101,7 +101,7 @@ Handle(GEOMGUI_AnnotationAttrs) GEOMGUI_AnnotationAttrs::FindAttributes( const _ _PTR(GenericAttribute) aGenericAttr; _PTR(AttributeParameter) aParameterMap; - if ( !theObject->FindAttribute( aGenericAttr, "AttributeParameter" ) ) + if ( !theObject || !theObject->FindAttribute( aGenericAttr, "AttributeParameter" ) ) { return Handle(GEOMGUI_AnnotationAttrs)(); }