From e8d853934b56bee6c9b2c37e5b74087efdd1037f Mon Sep 17 00:00:00 2001 From: yangxiao Date: Mon, 23 Nov 2015 14:33:39 +0800 Subject: [PATCH] terrain lua bindings --- .../lua-bindings/manual/3d/lua_cocos2dx_3d_manual.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos/scripting/lua-bindings/manual/3d/lua_cocos2dx_3d_manual.cpp b/cocos/scripting/lua-bindings/manual/3d/lua_cocos2dx_3d_manual.cpp index 4a2d049931..1fae2d5b69 100644 --- a/cocos/scripting/lua-bindings/manual/3d/lua_cocos2dx_3d_manual.cpp +++ b/cocos/scripting/lua-bindings/manual/3d/lua_cocos2dx_3d_manual.cpp @@ -319,10 +319,10 @@ void terraindata_to_luaval(lua_State* L,const cocos2d::Terrain::TerrainData& inV lua_rawset(L, -3); } - if (nullptr != inValue._alphaMapSrc) + if (!inValue._alphaMapSrc.empty()) { lua_pushstring(L, "_alphaMapSrc"); - lua_pushstring(L, inValue._alphaMapSrc); + lua_pushstring(L, inValue._alphaMapSrc.c_str()); lua_rawset(L, -3); }