Error on CC_SAFE_RELEASE

I am trying to run the following code from the cocos2dx port of fruit ninja at https://github.com/zeiteisen/CutCutCut2dx. I am getting an exception at CC_SAFE_RELEASE

void PRFilledPolygon::setTexture(CCTexture2D *var)
{
if (*texture != var)
{
CC_SAFE_RETAIN;
CC_SAFE_RELEASE;
*texture = var;
updateBlendFunc();
ccTexParams texParams = { GL_NEAREST, GL_NEAREST, GL_REPEAT, GL_REPEAT };
_texture~~>setTexParameters;
calculateTextureCoordinates;
}
}
I tried replacing the macro with
do {
if
{ _texture~~>release();
}
} while(0);

but getting the error on _texture->release();