release default fbo

This commit is contained in:
yangxiao 2015-11-24 18:11:16 +08:00
parent e8d853934b
commit aa38dfba89
1 changed files with 2 additions and 1 deletions

View File

@ -397,7 +397,6 @@ FrameBuffer::FrameBuffer()
FrameBuffer::~FrameBuffer()
{
if(!isDefaultFBO())
{
CC_SAFE_RELEASE_NULL(_rt);
CC_SAFE_RELEASE_NULL(_rtDepthStencil);
@ -407,6 +406,8 @@ FrameBuffer::~FrameBuffer()
#if CC_ENABLE_CACHE_TEXTURE_DATA
Director::getInstance()->getEventDispatcher()->removeEventListener(_dirtyFBOListener);
#endif
if (isDefaultFBO())
_defaultFBO = nullptr;
}
}