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); } },