0024047: Exception in TPrsStd_AISPresentation during destruction of TDocStd_Document
[occt.git] / src / AIS / AIS_InteractiveObject.cxx
index e2b914b..d6289ae 100755 (executable)
@@ -155,6 +155,8 @@ Handle(AIS_InteractiveContext) AIS_InteractiveObject::GetContext() const
 void AIS_InteractiveObject::SetContext(const Handle(AIS_InteractiveContext)& aCtx)
 {
   myCTXPtr = aCtx.operator->();
+  if( aCtx.IsNull())
+    return;
   if (myDrawer.IsNull()) {
     myDrawer = new AIS_Drawer;
 #ifdef DEB