summaryrefslogtreecommitdiff
path: root/i18nutil
diff options
context:
space:
mode:
authorPatrick Luby <plubius@libreoffice.org>2023-12-08 15:11:45 -0500
committerXisco Fauli <xiscofauli@libreoffice.org>2023-12-11 14:04:31 +0100
commit910dc29435395f9fd9c3019c1d3c59a0dcea2474 (patch)
tree8646008cf9c7366facc4331d2b0aabf2d43a28d8 /i18nutil
parentc3d4d56c37f1fc8448c4a1a69b6e39442fd36cfe (diff)
tdf#158379 check if PageDesc's m_pPSName is a nullptr
Change-Id: If9f6d695d40c1d55ee2dfbdf1e3523b33343d7ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160504 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@libreoffice.org> (cherry picked from commit 48748d5b5a89f27e1d2f610152145e3a19eda9a9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160473 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'i18nutil')
-rw-r--r--i18nutil/source/utility/paper.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/i18nutil/source/utility/paper.cxx b/i18nutil/source/utility/paper.cxx
index f88510c48afa..399b3295ed27 100644
--- a/i18nutil/source/utility/paper.cxx
+++ b/i18nutil/source/utility/paper.cxx
@@ -400,8 +400,7 @@ PaperInfo::PaperInfo(tools::Long nPaperWidth, tools::Long nPaperHeight)
OString PaperInfo::toPSName(Paper ePaper)
{
- return static_cast<size_t>(ePaper) < nTabSize ?
- OString(aDinTab[ePaper].m_pPSName) : OString();
+ return static_cast<size_t>(ePaper) < nTabSize && aDinTab[ePaper].m_pPSName ? OString(aDinTab[ePaper].m_pPSName) : OString();
}
Paper PaperInfo::fromPSName(const OString &rName)