mirror of
https://github.com/minetest/irrlicht.git
synced 2024-11-16 15:30:25 +01:00
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:
parent
3eee408cac
commit
bd7e357f77
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user