[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sd/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Dec 9 12:41:16 UTC 2020
sd/source/ui/view/sdview3.cxx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit f23388c4356c1c488f8445e97ba8d567d5bae8f1
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Dec 9 09:49:40 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Dec 9 13:40:44 2020 +0100
passed_freed_arg: InsertObjectAtView returns false if pObj was deleted
Change-Id: Ife8049e0426659f9b83504f1aced52b62159554b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107476
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index e05e370d3321..d5c2f494c3e6 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -994,12 +994,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