diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-08-18 16:32:00 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-08-18 22:54:25 +0200 |
commit | 7bba0f12e4bb726ef29a9b7c2f862128abcaf0d7 (patch) | |
tree | 64583d3db44342afe6dafdfbfafdf1fe8b4eb328 /svx/source/svdraw | |
parent | 133352645a8c10fc0d13795480a3c2f93c36a61f (diff) |
UnloadObj always dereferences its SdrOle2Obj* arg
Change-Id: I24f68e83c15f7fad464ad164e75e7cd49ae17b9e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120678
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r-- | svx/source/svdraw/svdetc.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx index 04219e7a8477..e97593ca0319 100644 --- a/svx/source/svdraw/svdetc.cxx +++ b/svx/source/svdraw/svdetc.cxx @@ -151,7 +151,7 @@ IMPL_LINK_NOARG(OLEObjCache, UnloadCheckHdl, Timer*, void) } } - if ( bUnload && UnloadObj(pUnloadObj) ) + if (bUnload && UnloadObj(*pUnloadObj)) { // object was successfully unloaded RemoveObj(pUnloadObj); @@ -216,7 +216,7 @@ const SdrOle2Obj* OLEObjCache::operator[](size_t nPos) const return maObjs[nPos]; } -bool OLEObjCache::UnloadObj(SdrOle2Obj* pObj) +bool OLEObjCache::UnloadObj(SdrOle2Obj& rObj) { bool bUnloaded = false; @@ -227,12 +227,12 @@ bool OLEObjCache::UnloadObj(SdrOle2Obj* pObj) // A much better (and working) criteria would be the VOC contact count. // The question is what will happen when i make it work now suddenly? I // will try it for 2.4. - const sdr::contact::ViewContact& rViewContact = pObj->GetViewContact(); + const sdr::contact::ViewContact& rViewContact = rObj.GetViewContact(); const bool bVisible(rViewContact.HasViewObjectContacts()); if(!bVisible) { - bUnloaded = pObj->Unload(); + bUnloaded = rObj.Unload(); } return bUnloaded; |