[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sd/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Dec 10 14:23:28 UTC 2020
sd/source/ui/view/sdview3.cxx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit f9b1ce7a2afeb5d26fb7901eedc40212269156dd
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Dec 9 09:49:40 2020 +0000
Commit: Michael Stahl <michael.stahl at cib.de>
CommitDate: Thu Dec 10 15:22:54 2020 +0100
passed_freed_arg: InsertObjectAtView returns false if pObj was deleted
Change-Id: Ife8049e0426659f9b83504f1aced52b62159554b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107477
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index c4ae7621a60c..cc856512ae21 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -995,12 +995,13 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
nOptions |= SdrInsertFlags::DONTMARK;
}
- InsertObjectAtView( pObj, *pPV, nOptions );
+ // bInserted of false means that pObj has been deleted
+ bool bInserted = InsertObjectAtView( pObj, *pPV, nOptions );
- if( pImageMap )
+ if (bInserted && pImageMap)
pObj->AppendUserData( std::unique_ptr<SdrObjUserData>(new SvxIMapInfo( *pImageMap )) );
- if (pObj->IsChart())
+ if (bInserted && pObj->IsChart())
{
bool bDisableDataTableDialog = false;
svt::EmbeddedObjectRef::TryRunningState( xObj );
More information about the Libreoffice-commits
mailing list