axmol/cocos2dx/menu_nodes
Denis Mingulov d4f65b5348 CCMenu - prevent a crash if some child item is not CCMenuItem
CCMenu::itemForTouch expects that all children are CCMenuItems.
But it is still possible to add other child types, for example
if CCAssert is disabled or some other addChild method is called.

In this case dynamic_cast to CCNode and later try to do
((CCMenuItem*)pChild)->isEnabled() triggers an undefined behaviour
- up to a crash or something else.

Fixed by a dynamic_cast straightforward to CCMenuItem.
2012-10-21 11:16:10 +03:00
..
CCMenu.cpp CCMenu - prevent a crash if some child item is not CCMenuItem 2012-10-21 11:16:10 +03:00
CCMenu.h Minor English Spelling Corrections. A few grammar corrections. 2012-09-17 00:02:24 -07:00
CCMenuItem.cpp fixed #1477: Abstracts Lua and JS binding protocol, some bugs fixes in lua-binding, adding custom menu on win32 and mac for switching resolutions. 2012-09-11 14:02:33 +08:00
CCMenuItem.h Minor English Spelling Corrections. A few grammar corrections. 2012-09-17 00:02:24 -07:00