diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 4acee37ada36..8359566cf6df 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -826,8 +826,8 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell) if (mpMarkedObj && mpMarkedObj->GetObjIdentifier() == OBJ_TABLE) { - auto* pTableObject = dynamic_cast(mpMarkedObj); - bTableSelection = pTableObject->createTableEdgesJson(aTableJsonTree); + auto& rTableObject = dynamic_cast(*mpMarkedObj); + bTableSelection = rTableObject.createTableEdgesJson(aTableJsonTree); rtl::Reference xController = static_cast(this)->getSelectionController(); if (xController.is() && xController->hasSelectedCells())