summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2022-06-20 14:45:07 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2022-06-21 17:01:18 +0200
commitdbaf5f6fad2ec10f69cf46f9cb697b8760c2a01f (patch)
tree416a8c4825f440aad54f81e8ae53f345b1d01578
parentd48dd6057ecc50dbb31d24adce76aaf27d16db16 (diff)
svp: fix UB SalGraphics vector access
Change-Id: Ic417ffbf91b04ebd6e6f18ac03b155fd01bbb316 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136226 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
-rw-r--r--vcl/headless/svpframe.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx
index 9ab3864aa7cd..23a7e2595bda 100644
--- a/vcl/headless/svpframe.cxx
+++ b/vcl/headless/svpframe.cxx
@@ -423,7 +423,7 @@ void SvpSalFrame::UpdateSettings( AllSettings& rSettings )
aStdFont.SetFontSize(Size(0, 12));
aStyleSettings.SetMenuFont(aStdFont);
- SvpSalGraphics* pGraphics = m_aGraphics.back();
+ SvpSalGraphics* pGraphics = m_aGraphics.empty() ? nullptr : m_aGraphics.back();
bool bFreeGraphics = false;
if (!pGraphics)
{