diff --git a/src/OpenGl/OpenGl_AspectMarker.cxx b/src/OpenGl/OpenGl_AspectMarker.cxx index 3d96ccea1e..d12df9a0cb 100644 --- a/src/OpenGl/OpenGl_AspectMarker.cxx +++ b/src/OpenGl/OpenGl_AspectMarker.cxx @@ -1644,7 +1644,7 @@ void OpenGl_AspectMarker::Resources::BuildSprites (const Handle(OpenGl_Context)& } else { - const TCollection_AsciiString anOldKey = mySprite->First()->ResourceId(); + const TCollection_AsciiString anOldKey = mySpriteA->First()->ResourceId(); mySpriteA.Nullify(); // we need nullify all handles before ReleaseResource() call theCtx->ReleaseResource (anOldKey, Standard_True); }