From 3d76e4a3ccd7bea1668606846b9ad53ff7a4c826 Mon Sep 17 00:00:00 2001 From: atsuo yamada Date: Sun, 14 Apr 2019 19:58:10 +0900 Subject: [PATCH] Cover exception by undefined _progressListener --- js/rpg_core/ProgressWatcher.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/rpg_core/ProgressWatcher.js b/js/rpg_core/ProgressWatcher.js index aad5409f..8d9f64be 100644 --- a/js/rpg_core/ProgressWatcher.js +++ b/js/rpg_core/ProgressWatcher.js @@ -12,7 +12,7 @@ ProgressWatcher._bitmapListener = function(bitmap){ this._countLoading++; bitmap.addLoadListener(function(){ this._countLoaded++; - this._progressListener(this._countLoaded, this._countLoading); + this._progressListener && this._progressListener(this._countLoaded, this._countLoading); }.bind(this)); }; @@ -20,7 +20,7 @@ ProgressWatcher._audioListener = function(audio){ this._countLoading++; audio.addLoadListener(function(){ this._countLoaded++; - this._progressListener(this._countLoaded, this._countLoading); + this._progressListener && this._progressListener(this._countLoaded, this._countLoading); }.bind(this)); };