mirror of https://github.com/axmolengine/axmol.git
Possible use of null pointer.
Or maybe better to add CCASSERT.
This commit is contained in:
parent
76d9916864
commit
1a16dd02f8
|
@ -77,6 +77,7 @@ bool ControlColourPicker::init()
|
|||
|
||||
// Add image
|
||||
_background=ControlUtils::addSpriteToTargetWithPosAndAnchor("menuColourPanelBackground.png", spriteSheet, Vec2::ZERO, Vec2(0.5f, 0.5f));
|
||||
if(!_background) return false;
|
||||
CC_SAFE_RETAIN(_background);
|
||||
|
||||
Vec2 backgroundPointZero = _background->getPosition() - Vec2(_background->getContentSize().width / 2, _background->getContentSize().height / 2);
|
||||
|
|
Loading…
Reference in New Issue