Crash fix in CCControlColurPickerTest.

This commit is contained in:
James Chen 2013-06-09 16:37:15 +08:00
parent 6b0c2667fd
commit 920418c21f
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