From c8af3fe0bd78d3229d4a2a895a65cf298599d552 Mon Sep 17 00:00:00 2001 From: minggo Date: Mon, 27 Mar 2017 15:19:24 +0800 Subject: [PATCH] fix crash in release mode (#17592) --- tests/lua-tests/src/ParticleTest/ParticleTest.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/lua-tests/src/ParticleTest/ParticleTest.lua b/tests/lua-tests/src/ParticleTest/ParticleTest.lua index e3b557aa98..547f577a02 100644 --- a/tests/lua-tests/src/ParticleTest/ParticleTest.lua +++ b/tests/lua-tests/src/ParticleTest/ParticleTest.lua @@ -78,10 +78,11 @@ local function setEmitterPosition() end local function update(dt) - if emitter ~= nil then - local str = "" .. emitter:getParticleCount() --- labelAtlas:setString("" .. str) - end + -- emitter may be released, for example it invokes emitter:setAutoRemoveOnFinish(true) +-- if emitter ~= nil then +-- local str = "" .. emitter:getParticleCount() +-- -- labelAtlas:setString("" .. str) +-- end end local function baseLayer_onEnterOrExit(tag)