From: aba Date: Mon, 16 Dec 2013 14:10:58 +0000 (+0400) Subject: 0024471: Erasing of the shape in HLR sample leads to sample crash. X-Git-Tag: V6_7_0~6 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=38fd051164e9ecb786902e2c1f7fd9adba735b6c;p=occt-copy.git 0024471: Erasing of the shape in HLR sample leads to sample crash. --- diff --git a/samples/mfc/standard/08_HLR/src/SelectionDialog.cpp b/samples/mfc/standard/08_HLR/src/SelectionDialog.cpp index c5888b6d66..27ece995ae 100644 --- a/samples/mfc/standard/08_HLR/src/SelectionDialog.cpp +++ b/samples/mfc/standard/08_HLR/src/SelectionDialog.cpp @@ -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); } }