vcl/headless/svpframe.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit dbaf5f6fad2ec10f69cf46f9cb697b8760c2a01f
Author:     Jan-Marek Glogowski <glo...@fbihome.de>
AuthorDate: Mon Jun 20 14:45:07 2022 +0200
Commit:     Jan-Marek Glogowski <glo...@fbihome.de>
CommitDate: Tue Jun 21 17:01:18 2022 +0200

    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 <glo...@fbihome.de>

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)
         {

Reply via email to