Fix unchecked dynamic_cast
This commit is contained in:
parent
b7c11c7c90
commit
11a7aad0ee
|
@ -263,14 +263,17 @@ void FMenuItem::createDialogList (FMenu* winmenu)
|
|||
if ( (*iter)->isDialog() )
|
||||
{
|
||||
FDialog* win = dynamic_cast<FDialog*>(*iter);
|
||||
FString win_title = win->getText();
|
||||
FMenuItem* win_item = new FMenuItem (win_title, winmenu);
|
||||
win_item->addCallback
|
||||
(
|
||||
"clicked",
|
||||
_METHOD_CALLBACK (this, &FMenuItem::cb_switchToDialog),
|
||||
dynamic_cast<FWidget::data_ptr>(win)
|
||||
);
|
||||
if ( win )
|
||||
{
|
||||
FString win_title = win->getText();
|
||||
FMenuItem* win_item = new FMenuItem (win_title, winmenu);
|
||||
win_item->addCallback
|
||||
(
|
||||
"clicked",
|
||||
_METHOD_CALLBACK (this, &FMenuItem::cb_switchToDialog),
|
||||
dynamic_cast<FWidget::data_ptr>(win)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
while ( iter != begin );
|
||||
|
|
Loading…
Reference in New Issue