From b843d3cd888197dcd2d7054b54cbab666e35cf44 Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 2 Jul 2013 14:45:06 +0800 Subject: [PATCH] LayerColor::initWithColor should return false when Layer::init() returns false. --- cocos2dx/layers_scenes_transitions_nodes/CCLayer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cocos2dx/layers_scenes_transitions_nodes/CCLayer.cpp b/cocos2dx/layers_scenes_transitions_nodes/CCLayer.cpp index 37b874dd4e..72d717af0e 100644 --- a/cocos2dx/layers_scenes_transitions_nodes/CCLayer.cpp +++ b/cocos2dx/layers_scenes_transitions_nodes/CCLayer.cpp @@ -749,8 +749,9 @@ bool LayerColor::initWithColor(const ccColor4B& color, GLfloat w, GLfloat h) setContentSize(CCSizeMake(w, h)); setShaderProgram(ShaderCache::sharedShaderCache()->programForKey(kShader_PositionColor)); + return true; } - return true; + return false; } bool LayerColor::initWithColor(const ccColor4B& color)