From a94d31d5eb02de5e59a5f2445441b17473e57219 Mon Sep 17 00:00:00 2001 From: knoxHuang <821686174@qq.com> Date: Wed, 29 Jun 2016 14:31:15 +0800 Subject: [PATCH] fix CCProfiler error --- cocos2d/core/utils/CCProfiler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos2d/core/utils/CCProfiler.js b/cocos2d/core/utils/CCProfiler.js index b660753d27..465c00d2f9 100644 --- a/cocos2d/core/utils/CCProfiler.js +++ b/cocos2d/core/utils/CCProfiler.js @@ -167,7 +167,7 @@ cc.profiler = (function () { hideStats: function () { _showFPS = false; - if (_fps.parentElement === cc.container) { + if (_fps && _fps.parentElement === cc.container) { cc.container.removeChild(_fps); } },