rive-app / rive-wasm

Wasm/JS runtime for Rive
MIT License
669 stars 46 forks source link

fix: add safety checks before invoking cleanup on renderer and file on main cleanup function #302

Closed zplata closed 1 year ago

zplata commented 1 year ago

Issue brought up on Discord where a user is trying to clean up instances where a file instance may not be created yet. Adding a few null safety checks before calling .delete() in the cleanup function to ensure this case is handled.

zplata commented 1 year ago

@luigi-rosso Ah yes, we should do that. Especially if Emscripten is still leaving behind its JS code on the object.