Skip to content

Need to safely handle case where bitmap fails to load #2220

Open
@benjiwheeler

Description

@benjiwheeler

If the bitmap loading in scratch-vm/src/import/load-costume.js's fetchBitmapCanvas_() function fails, we don't return any value from the promise.

This may be causing an error in loadBitmap_(), where we attempt to access the fetched.assetMatchesBase property without considering that fetched may never have received any value.

Example of a project that may be hitting this problem: https://scratch.mit.edu/projects/318191515/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions