From 00bf9f5bfb06ff317ff0fdce91511882e2ab8751 Mon Sep 17 00:00:00 2001 From: pipu Date: Tue, 10 Mar 2015 17:48:48 +0800 Subject: [PATCH] To optimize the situation that source path is existed, but source is not existed. --- .../cocostudio/WidgetReader/ButtonReader/ButtonReader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cocos/editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.cpp index 23a49a7388..f7d8cdc3cc 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.cpp @@ -602,7 +602,7 @@ namespace cocostudio { button->loadTextureNormal(normalTexturePath, (Widget::TextureResType)normalType); } - else + else if(normalTexturePath != "") { auto label = Label::create(); label->setString(__String::createWithFormat("%s missed", normalErrorFilePath.c_str())->getCString()); @@ -666,7 +666,7 @@ namespace cocostudio { button->loadTexturePressed(pressedTexturePath, (Widget::TextureResType)pressedType); } - else + else if(pressedTexturePath != "") { auto label = Label::create(); label->setString(__String::createWithFormat("%s missed", pressedErrorFilePath.c_str())->getCString()); @@ -730,7 +730,7 @@ namespace cocostudio { button->loadTextureDisabled(disabledTexturePath, (Widget::TextureResType)disabledType); } - else + else if(disabledTexturePath != "") { auto label = Label::create(); label->setString(__String::createWithFormat("%s missed", disabledErrorFilePath.c_str())->getCString());