diff options
author | sj <sj@openoffice.org> | 2010-11-22 18:56:17 +0100 |
---|---|---|
committer | sj <sj@openoffice.org> | 2010-11-22 18:56:17 +0100 |
commit | 1d93737ff8a4ad7ddee057cb6a30286bf4e6ff6b (patch) | |
tree | 306765e2dd001537d4798c0e1b562c31f5182fc5 /drawinglayer/source | |
parent | 0ba27a36e332f402ac6656c8d26cc40f111a640a (diff) |
os145: #b7001888# fixing small svm problem
Diffstat (limited to 'drawinglayer/source')
-rw-r--r-- | drawinglayer/source/primitive2d/metafileprimitive2d.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index 0d57e566ef8a..73683884e2bd 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -248,9 +248,12 @@ namespace if(nPushFlags) { OSL_ENSURE(maPropertyHolders.size(), "PropertyHolders: PUSH with no property holders (!)"); - PropertyHolder* pNew = new PropertyHolder(*maPropertyHolders.back()); - pNew->setPushFlags(nPushFlags); - maPropertyHolders.push_back(pNew); + if ( !maPropertyHolders.empty() ) + { + PropertyHolder* pNew = new PropertyHolder(*maPropertyHolders.back()); + pNew->setPushFlags(nPushFlags); + maPropertyHolders.push_back(pNew); + } } } @@ -354,8 +357,9 @@ namespace PropertyHolder& Current() { + static PropertyHolder aDummy; OSL_ENSURE(maPropertyHolders.size(), "PropertyHolders: CURRENT with no property holders (!)"); - return *maPropertyHolders.back(); + return maPropertyHolders.empty() ? aDummy : *maPropertyHolders.back(); } ~PropertyHolders() |