From 5b3d90ab25f2b4c2364c2a9eedd2b239bf0b541f Mon Sep 17 00:00:00 2001 From: Dimitar Tsenev Date: Thu, 19 Oct 2023 11:25:44 +0300 Subject: [PATCH] - add additional check for font index existence --- lib/gui/elistboxcontent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gui/elistboxcontent.cpp b/lib/gui/elistboxcontent.cpp index 1ba4b06c321..3911734d33e 100644 --- a/lib/gui/elistboxcontent.cpp +++ b/lib/gui/elistboxcontent.cpp @@ -965,7 +965,7 @@ int eListboxPythonMultiContent::getMaxItemTextWidth() if (pfnt) { int fnt_i = PyLong_AsLong(pfnt); - fnt = m_font[fnt_i]; + if (m_font.find(fnt_i) != m_font.end()) fnt = m_font[fnt_i]; } /* don't do anything if we have 'None' as string */