summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-01-14 13:19:32 +0200
committerAndras Timar <andras.timar@collabora.com>2019-01-17 14:43:41 +0100
commit13f8f38d9d6a102cbd53bdf56229324ee9dc7923 (patch)
tree79806f5a3a599e404623dd5a264d480a19df45c9 /basic
parent6de3c4450e8a3d34633ca0865f7186622f14f206 (diff)
tdf#122250 Crash when running extension
as a consequence of commit 4e07987ce8134312920682e3481c3f8e3d7b66c3 Date: Thu Aug 25 15:08:55 2016 +0200 cid#1371154 Missing move assignment operator this extensions appears to pass bogus data into VCLXWindow::setProperty, so I had to workaround that when debugging Change-Id: Ib6728c0a990bd7cfbfed43d79b7560bd2f7f5a67 Reviewed-on: https://gerrit.libreoffice.org/66297 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit b2fa854e81d329c9ed49bd10944cea1a430ecf7e)
Diffstat (limited to 'basic')
-rw-r--r--basic/source/sbx/sbxarray.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx
index 911a692c1def..99acf3325918 100644
--- a/basic/source/sbx/sbxarray.cxx
+++ b/basic/source/sbx/sbxarray.cxx
@@ -203,10 +203,14 @@ void SbxArray::Put( SbxVariable* pVar, sal_uInt16 nIdx )
if( eType != SbxOBJECT || pVar->GetClass() != SbxClassType::Object )
pVar->Convert( eType );
SbxVariableRef& rRef = GetRef( nIdx );
+ // tdf#122250. It is possible that I hold the last reference to myself, so check, otherwise I might
+ // call SetFlag on myself after I have died.
+ bool removingMyself = rRef.get() && rRef->GetParameters() == this && GetRefCount() == 1;
if(rRef.get() != pVar )
{
rRef = pVar;
- SetFlag( SbxFlagBits::Modified );
+ if (!removingMyself)
+ SetFlag( SbxFlagBits::Modified );
}
}
}