summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-03-01 10:39:34 +0000
committerGabor Kelemen <kelemeng@ubuntu.com>2022-04-02 13:42:26 +0200
commit5efab2e982890349a29f3ab5fa0944760e26e145 (patch)
treee2e31b0d14441a700a77d03730d3b2e74fddaa5c
parent92f0aeaac8736e5e44b301fa90c07a5614664be1 (diff)
fail more gracefully if m_aTmpPosition is empty
LIBREOFFICE-N4LA0OHZ Change-Id: I7f863151f753ad5605c4f1f280cfd79aa4c6bce4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130772 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 02837024ea8d3d52c92420858327b309f2e96487) (cherry picked from commit 9fc1be2594ceac46e9a769d7ee2a2004869603ac)
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableManager.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index b698fabe0c44..99ebfa11619f 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -541,6 +541,8 @@ void DomainMapperTableManager::endOfRowAction()
// Compare the table position with the previous ones. We may need to split
// into two tables if those are different. We surely don't want to do anything
// if we don't have any row yet.
+ if (m_aTmpPosition.empty())
+ throw std::out_of_range("row without a position");
TablePositionHandlerPtr pTmpPosition = m_aTmpPosition.back();
TablePropertyMapPtr pTablePropMap = m_aTmpTableProperties.back( );
TablePositionHandlerPtr pCurrentPosition = m_aTablePositions.back();