diff --git a/cocos/2d/platform/CCFileUtils.cpp b/cocos/2d/platform/CCFileUtils.cpp index c356a20af9..a19a88f0dc 100644 --- a/cocos/2d/platform/CCFileUtils.cpp +++ b/cocos/2d/platform/CCFileUtils.cpp @@ -680,6 +680,11 @@ std::string FileUtils::getPathForFilename(const std::string& filename, const std std::string FileUtils::fullPathForFilename(const std::string &filename) { + if (filename.empty()) + { + return ""; + } + if (isAbsolutePath(filename)) { return filename;