diff --git a/cocos2d/core/load-pipeline/CCLoader.js b/cocos2d/core/load-pipeline/CCLoader.js index ed0af8b7d9..93d2535794 100644 --- a/cocos2d/core/load-pipeline/CCLoader.js +++ b/cocos2d/core/load-pipeline/CCLoader.js @@ -287,6 +287,9 @@ JS.mixin(CCLoader.prototype, { _resources: resources, _getResUuid: function (url, type, quiet) { + if (!url) { + return null; + } // Ignore parameter var index = url.indexOf('?'); if (index !== -1) diff --git a/cocos2d/core/load-pipeline/loading-items.js b/cocos2d/core/load-pipeline/loading-items.js index 23d1f7899c..8c643db7d2 100644 --- a/cocos2d/core/load-pipeline/loading-items.js +++ b/cocos2d/core/load-pipeline/loading-items.js @@ -270,8 +270,13 @@ var LoadingItems = function (pipeline, urlList, onProgress, onComplete) { this.active = false; } - if (urlList && urlList.length > 0) { - this.append(urlList); + if (urlList) { + if (urlList.length > 0) { + this.append(urlList); + } + else { + this.allComplete(); + } } };