This commit is contained in:
songchengjiang 2015-11-27 09:34:31 +08:00
commit fc4c3ec650
2 changed files with 4 additions and 3 deletions

View File

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

View File

@ -319,10 +319,10 @@ void terraindata_to_luaval(lua_State* L,const cocos2d::Terrain::TerrainData& inV
lua_rawset(L, -3); lua_rawset(L, -3);
} }
if (nullptr != inValue._alphaMapSrc) if (!inValue._alphaMapSrc.empty())
{ {
lua_pushstring(L, "_alphaMapSrc"); lua_pushstring(L, "_alphaMapSrc");
lua_pushstring(L, inValue._alphaMapSrc); lua_pushstring(L, inValue._alphaMapSrc.c_str());
lua_rawset(L, -3); lua_rawset(L, -3);
} }