Salome HOME
Prevent exception at shape selection if no mesh was pre-selected
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_RotationDlg.cxx
index e8ae9052eb3d614d40caf812d6439b09990b33e7..fd7253b76e22edd6a31cfee198fc5e1f58b58ea1 100644 (file)
 #include <qlayout.h>
 #include <qpixmap.h>
 
+// IDL Headers
+#include "SALOMEconfig.h"
+#include CORBA_SERVER_HEADER(SMESH_Group)
+
 using namespace std;
 
 //=================================================================================
@@ -529,7 +533,10 @@ void SMESHGUI_RotationDlg::SelectionIntoArgument()
   myMesh = SMESH::GetMeshByIO( mySelection->firstIObject() );
   if(myMesh->_is_nil())
     return;
+
   myActor = SMESH::FindActorByObject(myMesh);
+  if (!myActor)
+    myActor = SMESH::FindActorByEntry(IO->getEntry());
   if (!myActor)
     return;