Salome HOME
Improve calculation of size of preferences panel.
[modules/shaper.git] / src / XGUI / XGUI_Displayer.cpp
index 00360a96defc2743b9c8edb97c976c1f76507aaa..7e690a0f1d1acf6a414c13d839b025026c5ce885 100644 (file)
@@ -77,6 +77,7 @@
 
 #include <TColStd_MapOfTransient.hxx>
 #include <TColStd_MapIteratorOfMapOfTransient.hxx>
+#include <Standard_Version.hxx>
 
 #ifdef TINSPECTOR
 #include <inspector/VInspectorAPI_CallBack.hxx>
@@ -577,7 +578,8 @@ ObjectPtr XGUI_Displayer::getObject(const Handle(AIS_InteractiveObject)& theIO)
     if (!theIO.IsNull()) {
       anAISObj->setImpl(new Handle(AIS_InteractiveObject)(theIO));
     }
-    anObject = myWorkshop->module()->findPresentedObject(anAISObj);
+    if (myWorkshop->module())
+      anObject = myWorkshop->module()->findPresentedObject(anAISObj);
   }
   return anObject;
 }