Fix unchecked dynamic_cast

This commit is contained in:
Markus Gans 2016-07-03 20:27:27 +02:00
parent b7c11c7c90
commit 11a7aad0ee
1 changed files with 11 additions and 8 deletions

View File

@ -263,6 +263,8 @@ void FMenuItem::createDialogList (FMenu* winmenu)
if ( (*iter)->isDialog() ) if ( (*iter)->isDialog() )
{ {
FDialog* win = dynamic_cast<FDialog*>(*iter); FDialog* win = dynamic_cast<FDialog*>(*iter);
if ( win )
{
FString win_title = win->getText(); FString win_title = win->getText();
FMenuItem* win_item = new FMenuItem (win_title, winmenu); FMenuItem* win_item = new FMenuItem (win_title, winmenu);
win_item->addCallback win_item->addCallback
@ -273,6 +275,7 @@ void FMenuItem::createDialogList (FMenu* winmenu)
); );
} }
} }
}
while ( iter != begin ); while ( iter != begin );
} }
winmenu->menu_dimension(); winmenu->menu_dimension();