tdf#51850 sw: fix a nullpointer crash
lcl_PasteFlyOrDrawFormat() may return nullptr, causing testTdf155028 to
crash in older release branch.
(regression from commit d072b5e09e)
Change-Id: I68549648aef2c9d58919f4d26415834d0784eeef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192173
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins
This commit is contained in:
@@ -1079,7 +1079,7 @@ SwFEShell::Paste(SwDoc& rClpDoc, bool const bNestedTable)
|
||||
{
|
||||
lcl_InitSelectFlyOrDrawFormat(pFlyFormat, *this, isSelect);
|
||||
}
|
||||
if (isSelect && inserted.size() == 1)
|
||||
if (isSelect && inserted.size() == 1 && inserted.front())
|
||||
{
|
||||
if (inserted.front()->Which() == RES_FLYFRMFMT
|
||||
&& GetDoc()->GetNodes()[inserted.front()->GetContent().GetContentIdx()->GetIndex() + 1]->IsGrfNode())
|
||||
|
||||
Reference in New Issue
Block a user