{"action":"opened","issue":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/16158","repository_url":"https://api.github.com/repos/cocos2d/cocos2d-x","labels_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/16158/labels{/name}","comments_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/16158/comments","events_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/16158/events","html_url":"https://github.com/cocos2d/cocos2d-x/issues/16158","id":166437097,"number":16158,"title":"[Cocos2d-x 3.12] extensions::ControlSwitch::create() bug","user":{"login":"Drakon-Cocos","id":19324622,"avatar_url":"https://avatars.githubusercontent.com/u/19324622?v=3","gravatar_id":"","url":"https://api.github.com/users/Drakon-Cocos","html_url":"https://github.com/Drakon-Cocos","followers_url":"https://api.github.com/users/Drakon-Cocos/followers","following_url":"https://api.github.com/users/Drakon-Cocos/following{/other_user}","gists_url":"https://api.github.com/users/Drakon-Cocos/gists{/gist_id}","starred_url":"https://api.github.com/users/Drakon-Cocos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Drakon-Cocos/subscriptions","organizations_url":"https://api.github.com/users/Drakon-Cocos/orgs","repos_url":"https://api.github.com/users/Drakon-Cocos/repos","events_url":"https://api.github.com/users/Drakon-Cocos/events{/privacy}","received_events_url":"https://api.github.com/users/Drakon-Cocos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-19T21:13:35Z","updated_at":"2016-07-19T21:13:35Z","closed_at":null,"body":"The function \r\n`ControlSwitch* create(Sprite *maskSprite, Sprite * onSprite, Sprite * offSprite, Sprite * thumbSprite)` makes the game to crash because calls `addChild` on `nullptr` object.\r\nThe function tries to add a null `Label` that user can specify using this other function:\r\n`ControlSwitch* create(Sprite *maskSprite, Sprite * onSprite, Sprite * offSprite, Sprite * thumbSprite, Label* onLabel, Label* offLabel)`\r\n    "}}
{"actor":{"display_login":"Drakon-Cocos"}}