diff options
author | Rene Engelhard <rene@debian.org> | 2010-11-26 17:50:29 +0100 |
---|---|---|
committer | Rene Engelhard <rene@debian.org> | 2010-11-26 17:50:29 +0100 |
commit | 299359d0b860d87498729693bfd8fbcb4341496f (patch) | |
tree | 8bf3c191701406abc92b2d36eb7aab8c2ba06d55 /drawinglayer/source/primitive2d | |
parent | 6c3199bfcb468b6158c1692ec88e961129962352 (diff) | |
parent | 2dda128c4063a124cbbecdeecd34e4b11a927657 (diff) |
Merge branch 'libreoffice-3-3'
Diffstat (limited to 'drawinglayer/source/primitive2d')
-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 64d0af5c4b68..e135a3509ba6 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -249,9 +249,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); + } } } @@ -355,8 +358,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() |