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>
This commit is contained in:
Jan-Marek Glogowski
2022-06-21 17:01:18 +02:00
parent d48dd6057e
commit dbaf5f6fad
+1 -1
View File
@@ -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)
{