EXC_BAD_ACCESS on porting code from Cocos2d-x 2.2 to 3.0RC


#1

Hi guys the following code causes a EXC_BAD_ACCESS. Does anybody know the reason?

CCMenuItemImage *item1 = CCMenuItemImage::create(“stard.png”,NULL,NULL,this,menu_selector(Widgets::oneStar));


#2

Fixed it myself :slight_smile:

it has to be MenuItemImage *item1 = MenuItemImage::create(“stard.png”, emptyString, CC_CALLBACK_1(Widgets::oneStar,this));