mirror of https://github.com/axmolengine/axmol.git
modify the logic of "node" method
This commit is contained in:
parent
61ccb9f59e
commit
ed4e288f27
|
@ -65,9 +65,12 @@ CCLayer *CCLayer::node()
|
|||
pRet->autorelease();
|
||||
return pRet;
|
||||
}
|
||||
else
|
||||
{
|
||||
CCX_SAFE_DELETE(pRet)
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/// Touch and Accelerometer related
|
||||
|
||||
|
|
|
@ -61,7 +61,10 @@ CCScene *CCScene::node()
|
|||
pRet->autorelease();
|
||||
return pRet;
|
||||
}
|
||||
else
|
||||
{
|
||||
CCX_SAFE_DELETE(pRet)
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}//namespace cocos2d
|
||||
|
|
Loading…
Reference in New Issue