X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FTPrsStd%2FTPrsStd_AISPresentation.cxx;h=2d9ab49914ce920e0c07d2645d6eb73262c9e000;hp=560bdba4ee3f5e40cbf97755ef9a061ef11854f0;hb=da0e82aac3fff843743f73f757f221ffec5ecfdb;hpb=efef9da8e5c588b8662f4c474a5a7880af2ea611 diff --git a/src/TPrsStd/TPrsStd_AISPresentation.cxx b/src/TPrsStd/TPrsStd_AISPresentation.cxx index 560bdba..2d9ab49 100755 --- a/src/TPrsStd/TPrsStd_AISPresentation.cxx +++ b/src/TPrsStd/TPrsStd_AISPresentation.cxx @@ -1032,10 +1032,11 @@ void TPrsStd_AISPresentation::AISErase (const Standard_Boolean remove) Handle(AIS_InteractiveContext) ctx, ownctx; if ( !myAIS.IsNull() ) { - ownctx = myAIS->GetContext(); + if ( !Label().IsNull()) { Handle(TPrsStd_AISViewer) viewer; - if( !TPrsStd_AISViewer::Find(Label(), viewer) ) return; + if( !TPrsStd_AISViewer::Find(Label(), viewer) ) return; + ownctx = myAIS->GetContext(); ctx = viewer->GetInteractiveContext(); if( remove ) { if( !ctx.IsNull() ) ctx->Remove (myAIS,Standard_False);