Bugfix for imagetilesource _freeupCanvasMemory

This commit is contained in:
pearcetm 2022-05-18 12:26:19 -04:00 committed by GitHub
parent a27b511ad3
commit af26fdbff1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -272,8 +272,10 @@
*/
_freeupCanvasMemory: function () {
for (var i = 0; i < this.levels.length; i++) {
this.levels[i].context2D.canvas.height = 0;
this.levels[i].context2D.canvas.width = 0;
if(this.levels[i].context2D){
this.levels[i].context2D.canvas.height = 0;
this.levels[i].context2D.canvas.width = 0;
}
}
},
});