Change risky cast into dynamic_cast, fixing crash
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14627 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
46bb243955
commit
a358c4d8ee
@ -1364,7 +1364,7 @@ void Skin::drawSpinnerChild(const core::recti &rect, Widget* widget,
|
||||
void Skin::drawIconButton(const core::recti &rect, Widget* widget,
|
||||
const bool pressed, bool focused)
|
||||
{
|
||||
RibbonWidget* parentRibbon = (RibbonWidget*)widget->m_event_handler;
|
||||
RibbonWidget* parentRibbon = dynamic_cast<RibbonWidget*>(widget->m_event_handler);
|
||||
IGUIElement* focusedElem = NULL;
|
||||
if (GUIEngine::getFocusForPlayer(PLAYER_ID_GAME_MASTER) != NULL)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user