summaryrefslogtreecommitdiff
path: root/writerfilter/source/rtftok/rtfdocumentimpl.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-08-20 08:56:54 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-11-19 12:00:36 +0000
commitb4840d3632e4404bee4bd192a7db916cbad3a401 (patch)
treed58f9557705b0a97f2f64e2a2c222c9f4610988b /writerfilter/source/rtftok/rtfdocumentimpl.cxx
parent4d511b91d2fef9e316bcc9fecc33e2ceacaeebd4 (diff)
Resolves: fdo#86449 backport rtf fixes
empty Reference valgrind + bff (cherry picked from commit 0a42632a74596cbc781746931bf8f2650994b80f) empty m_aStates valgrind + bff (cherry picked from commit e3247719911f4e9b61ec43ea1c9ce04bcddc4ff8) Change-Id: Id3c039a46dec5d2d4a4642dfb53d23a76972dde2 3bd526b7ebf0f4fce5d0c7054809e0dc2908e73f Reviewed-on: https://gerrit.libreoffice.org/12965 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'writerfilter/source/rtftok/rtfdocumentimpl.cxx')
-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: