I am trying to add black backgound with opacity to my sprite (something like LIghtbox):
CCLayerColor *blackBg = CCLayerColor::layerWithColor(ccc4(0, 0, 0, 100));
this~~>addChild;
And I get EXC_BAD_ACCESS when adding it to “this”. “this” is not NULL, and blackBg too.
void CCSprite::addChild
{
CCAssert;
CCNode::addChild;
if
{
CCAssertpChild)>getTexture()>getName == m_pobTextureAtlas~~>getTexture()>getName, “”);// Here is the line where I get EXC_BAD_ACCESS>atlasIndexForChild((CCSprite*)(pChild), zOrder);
unsigned int index = m_pobBatchNode
m_pobBatchNode->insertChild((CCSprite*)(pChild), index);
}
Can anyone explain what this line means?