sd: fix null deref in ModifyPageUndoAction::Undo/Redo
See https://crashreport.libreoffice.org/stats/signature/SfxViewFrame::GetDispatcher() Change-Id: Iaf14ad8fd5dab878ea5e3d6997371c2d8a4beac6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144241 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Jenkins
This commit is contained in:
parent
a0c24199e4
commit
f9c857563f
1 changed files with 12 additions and 4 deletions
|
@ -118,8 +118,12 @@ void ModifyPageUndoAction::Undo()
|
|||
}
|
||||
|
||||
// Redisplay
|
||||
SfxViewFrame::Current()->GetDispatcher()->Execute(
|
||||
SID_SWITCHPAGE, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD );
|
||||
SfxViewFrame* pCurrent = SfxViewFrame::Current();
|
||||
if( pCurrent )
|
||||
{
|
||||
pCurrent->GetDispatcher()->Execute(
|
||||
SID_SWITCHPAGE, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD );
|
||||
}
|
||||
}
|
||||
|
||||
void ModifyPageUndoAction::Redo()
|
||||
|
@ -161,8 +165,12 @@ void ModifyPageUndoAction::Redo()
|
|||
}
|
||||
|
||||
// Redisplay
|
||||
SfxViewFrame::Current()->GetDispatcher()->Execute(
|
||||
SID_SWITCHPAGE, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD );
|
||||
SfxViewFrame* pCurrent = SfxViewFrame::Current();
|
||||
if( pCurrent )
|
||||
{
|
||||
pCurrent->GetDispatcher()->Execute(
|
||||
SID_SWITCHPAGE, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD );
|
||||
}
|
||||
}
|
||||
|
||||
ModifyPageUndoAction::~ModifyPageUndoAction()
|
||||
|
|
Loading…
Reference in a new issue