Tauri segfault on mac..

...when calling invoke in a setInterval context in a window that is closed

Steps to reproduce

  1. Ensure you use a mac. It might crash on other OSes too, but have not tested it.
  2. Run yarn tauri dev
  3. Close the window
  4. Observe segfault