diff --git a/HISTORY.md b/HISTORY.md index 21fdb984..36e8f2a3 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -5,6 +5,7 @@ * export / import sprite-local custom block definitions, under construction * **Notable Changes:** * **Notable Fixes:** + * guard against broken SVG costumes when loading a project * **Documentation Updates:** * **Translation Updates:** @@ -13,6 +14,7 @@ * byob, store, gui: export / import sprite-local custom block definitions, under construction * byob, gui: adapted library import dialog to the new format * byob: added collecting dependencies for sprite-local custom blocks +* objects: guard against broken SVG costumes when loading a project ## 7.3.0: * **New Features:** diff --git a/snap.html b/snap.html index f97b81b3..8fe7c0da 100755 --- a/snap.html +++ b/snap.html @@ -18,7 +18,7 @@ - + diff --git a/src/objects.js b/src/objects.js index b64c4879..7e85c45f 100644 --- a/src/objects.js +++ b/src/objects.js @@ -87,7 +87,7 @@ BlockVisibilityDialogMorph, CostumeIconMorph, SoundIconMorph*/ /*jshint esversion: 6*/ -modules.objects = '2022-March-04'; +modules.objects = '2022-March-09'; var SpriteMorph; var StageMorph; @@ -10352,11 +10352,11 @@ Costume.prototype.center = function () { }; Costume.prototype.width = function () { - return this.contents.width; + return this.contents ? this.contents.width : 0; }; Costume.prototype.height = function () { - return this.contents.height; + return this.contents ? this.contents.height : 0; }; Costume.prototype.bounds = function () {