Skip to content

Commit bd09551

Browse files
authored
Merge pull request #21159 from Mugen87/dev51
Editor: Call dispose() on textures.
2 parents cf3b4b6 + 1cba545 commit bd09551

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

editor/js/commands/SetMaterialMapCommand.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ SetMaterialMapCommand.prototype = {
3131

3232
execute: function () {
3333

34+
if ( this.oldMap !== null && this.oldMap !== undefined ) this.oldMap.dispose();
35+
3436
this.material[ this.mapName ] = this.newMap;
3537
this.material.needsUpdate = true;
3638

0 commit comments

Comments
 (0)