| author | Noel Power <noel.power@suse.com> | 2012-08-27 09:51:42 (GMT) |
|---|---|---|
| committer | Noel Power <noel.power@suse.com> | 2012-08-27 09:53:36 (GMT) |
| commit | 55899d7f5f3125ea2d4b1178065ffea80b3d2b50 (patch) (side-by-side diff) | |
| tree | bca9c47850aadca2f6316b7a5a7bbaf5f576aaba | |
| parent | 123393ca342e1865cdc9acaa654e27eabb14f232 (diff) | |
| download | core-55899d7f5f3125ea2d4b1178065ffea80b3d2b50.zip core-55899d7f5f3125ea2d4b1178065ffea80b3d2b50.tar.gz | |
fix for fdo#54046
fix case where the value is neither uno object or unostruct
Change-Id: I2862ab23a875a691edb202bb9d334b000871f718
| -rw-r--r-- | basic/source/runtime/step0.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/basic/source/runtime/step0.cxx b/basic/source/runtime/step0.cxx index 0ddda8f..667a805 100644 --- a/basic/source/runtime/step0.cxx +++ b/basic/source/runtime/step0.cxx @@ -351,7 +351,13 @@ inline bool checkUnoStructCopy( bool bVBA, SbxVariableRef& refVal, SbxVariableRe SbUnoObject* pUnoVal = PTR_CAST(SbUnoObject,(SbxObject*)xValObj); SbUnoStructRefObject* pUnoStructVal = PTR_CAST(SbUnoStructRefObject,(SbxObject*)xValObj); - Any aAny = pUnoVal ? pUnoVal->getUnoAny() : pUnoStructVal->getUnoAny(); + Any aAny; + // make doubly sure value is either an Uno object or + // an uno struct + if ( pUnoVal || pUnoStructVal ) + aAny = pUnoVal ? pUnoVal->getUnoAny() : pUnoStructVal->getUnoAny(); + else + return false; if ( aAny.getValueType().getTypeClass() == TypeClass_STRUCT ) { refVar->SetType( SbxOBJECT ); |
