0025371: Visualization - raise exception in AIS_ConnectedInteractive::Connect() on...
[occt.git] / src / AIS / AIS_ConnectedInteractive.cxx
index 31e3c51..f80bdc2 100644 (file)
@@ -35,6 +35,7 @@
 #include <Precision.hxx>
 #include <AIS_Drawer.hxx>
 #include <TopAbs_ShapeEnum.hxx>
+#include <Standard_ProgramError.hxx>
 #include <StdPrs_WFDeflectionShape.hxx>
 #include <StdPrs_HLRPolyShape.hxx>
 #include <Prs3d_Drawer.hxx>
@@ -86,6 +87,10 @@ void AIS_ConnectedInteractive::Connect (const Handle(AIS_InteractiveObject)& the
   {
     myReference = theAnotherObj;
   }
+  else
+  {
+    Standard_ProgramError::Raise ("AIS_ConnectedInteractive::Connect() - object without own presentation can not be connected");
+  }
 
   if (!myReference.IsNull())
   {