Merge pull request #2844 from dumganhar/develop

Crash fix in CCControlColurPickerTest.
This commit is contained in:
James Chen 2013-06-09 01:41:08 -07:00
commit e0000c1a1f
1 changed files with 2 additions and 1 deletions

View File

@ -79,7 +79,8 @@ bool CCControlColourPicker::init()
// Add image
m_background=CCControlUtils::addSpriteToTargetWithPosAndAnchor("menuColourPanelBackground.png", spriteSheet, CCPointZero, ccp(0.5f, 0.5f));
CC_SAFE_RETAIN(m_background);
CCPoint backgroundPointZero = ccpSub(m_background->getPosition(), ccp (m_background->getContentSize().width / 2, m_background->getContentSize().height / 2));
// Setup panels