cid#1453561 Null pointer dereferences

Change-Id: If85383ac4c4e24eb10fed0c78fe879355bbc4fb6
Reviewed-on: https://gerrit.libreoffice.org/78626
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara
2019-09-05 08:59:09 +01:00
parent bb9c07b82f
commit 644211dbba

View File

@@ -826,8 +826,8 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell)
if (mpMarkedObj && mpMarkedObj->GetObjIdentifier() == OBJ_TABLE)
{
auto* pTableObject = dynamic_cast<sdr::table::SdrTableObj*>(mpMarkedObj);
bTableSelection = pTableObject->createTableEdgesJson(aTableJsonTree);
auto& rTableObject = dynamic_cast<sdr::table::SdrTableObj&>(*mpMarkedObj);
bTableSelection = rTableObject.createTableEdgesJson(aTableJsonTree);
rtl::Reference<sdr::SelectionController> xController = static_cast<SdrView*>(this)->getSelectionController();
if (xController.is() && xController->hasSelectedCells())