Commit e10f17dc authored by cutealien's avatar cutealien

Fix crash in Meshviewer when dialog-window was closed before opening model (found by randomMesh).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3035 dfc29bdd-3216-0410-991c-e03cc46cb475
parent f964cb3d
...@@ -128,6 +128,8 @@ void SetSkinTransparency(s32 alpha, irr::gui::IGUISkin * skin) ...@@ -128,6 +128,8 @@ void SetSkinTransparency(s32 alpha, irr::gui::IGUISkin * skin)
void UpdateScaleInfo(scene::ISceneNode* model) void UpdateScaleInfo(scene::ISceneNode* model)
{ {
IGUIElement* toolboxWnd = Device->getGUIEnvironment()->getRootGUIElement()->getElementFromId(GUI_ID_DIALOG_ROOT_WINDOW, true); IGUIElement* toolboxWnd = Device->getGUIEnvironment()->getRootGUIElement()->getElementFromId(GUI_ID_DIALOG_ROOT_WINDOW, true);
if (!toolboxWnd)
return;
if (!model) if (!model)
{ {
toolboxWnd->getElementFromId(GUI_ID_X_SCALE, true)->setText( L"-" ); toolboxWnd->getElementFromId(GUI_ID_X_SCALE, true)->setText( L"-" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment