0024471: Erasing of the shape in HLR sample leads to sample crash.
authoraba <aba@opencascade.com>
Mon, 16 Dec 2013 14:10:58 +0000 (18:10 +0400)
committerapn <apn@opencascade.com>
Tue, 17 Dec 2013 08:18:22 +0000 (12:18 +0400)
samples/mfc/standard/08_HLR/src/SelectionDialog.cpp

index c5888b6..27ece99 100644 (file)
@@ -216,7 +216,8 @@ void CSelectionDialog::OnGetSelectedShapes()
       OneOrMoreFound = Standard_True;
       TopoDS_Shape aShape = anAISShape->Shape();
       myDisplayableShape->Add (aShape);
-      myInteractiveContext->Display (anAISShape);
+      Handle(AIS_Shape) aSelectedShape = new AIS_Shape (aShape);
+      myInteractiveContext->Display (aSelectedShape);
     }
   }