There was an error while loading. Please reload this page.
1 parent ba712fd commit 31ea77bCopy full SHA for 31ea77b
1 file changed
src/RenderWebGL.js
@@ -690,6 +690,16 @@ class RenderWebGL extends EventEmitter {
690
*/
691
destroySkin (skinId) {
692
const oldSkin = this._allSkins[skinId];
693
+ /*
694
+ Destroying a skin that is already gone is a no-op, not an error.
695
+
696
+ `costumeSync.syncRemoteToLocal` destroys every skin a rebuilt costume list no longer
697
+ references, and a costume converting between vector and bitmap can have taken one already.
698
+ Throwing there did far more than log: it abandoned the rest of the rebuild, so the costumes
699
+ after the failure kept whatever pictures they had, with nothing to say the list was only
700
+ half applied.
701
+ */
702
+ if (!oldSkin) return;
703
oldSkin.dispose();
704
delete this._allSkins[skinId];
705
}
0 commit comments