summaryrefslogtreecommitdiff
path: root/writerfilter/source/rtftok
diff options
context:
space:
mode:
Diffstat (limited to 'writerfilter/source/rtftok')
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 31ff8b83a1c3..be561618d1e8 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -5789,12 +5789,13 @@ int RTFDocumentImpl::popState()
case DESTINATION_SHAPEPROPERTYNAME:
case DESTINATION_SHAPEPROPERTYVALUE:
case DESTINATION_SHAPEPROPERTY:
- {
- m_aStates.top().aShape = aState.aShape;
- m_aStates.top().aPicture = aState.aPicture;
- m_aStates.top().aCharacterAttributes = aState.aCharacterAttributes;
- }
- break;
+ if (!m_aStates.empty())
+ {
+ m_aStates.top().aShape = aState.aShape;
+ m_aStates.top().aPicture = aState.aPicture;
+ m_aStates.top().aCharacterAttributes = aState.aCharacterAttributes;
+ }
+ break;
case DESTINATION_FLYMAINCONTENT:
case DESTINATION_SHPPICT:
case DESTINATION_SHAPE: