Add checks for valid skin pointer in CGUIMenu

Found with VS analyser

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6395 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien 2022-05-14 14:03:30 +00:00
parent 3eee408cac
commit bd7e357f77

View File

@ -42,6 +42,9 @@ void CGUIMenu::draw()
return;
IGUISkin* skin = Environment->getSkin();
if ( !skin )
return;
IGUIFont* font = skin->getFont(EGDF_MENU);
if (font != LastFont)
@ -199,6 +202,8 @@ void CGUIMenu::recalculateSize()
IGUISkin* skin = Environment->getSkin();
if ( !skin )
return;
IGUIFont* font = skin->getFont(EGDF_MENU);
if (!font)