Salome HOME
Clean-up deprecated OCCT-related code
[modules/hexablock.git] / src / HEXABLOCKGUI / HEXABLOCKGUI_SalomeTools.cxx
index 814b49426b743bddc9f85f47878f964077f9f8af..2fed0c5e7d3f62bf475189e60ae161532a48ad90 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2009-2014  CEA/DEN, EDF R&D
+// Copyright (C) 2009-2016  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -28,8 +28,6 @@
 #include <vtkActorCollection.h>
 #include <vtkUnstructuredGrid.h>
 
-
-
 #include <SUIT_Session.h>
 
 #include <SalomeApp_Study.h>
@@ -175,7 +173,10 @@ namespace GUI
                        Handle(SelectMgr_Selection) sel = theObj->Selection( m );
 
                        for ( sel->Init(); sel->More(); sel->Next() ) {
-                               Handle(SelectBasics_SensitiveEntity) entity = sel->Sensitive();
+                                const Handle(SelectMgr_SensitiveEntity) aHSenEntity = sel->Sensitive();
+                                if ( aHSenEntity.IsNull() )
+                                        continue;
+                                Handle(SelectBasics_SensitiveEntity) entity = aHSenEntity->BaseSensitive();
                                if ( entity.IsNull() )
                                        continue;