mpv.net
mpv.net copied to clipboard
fix: destroy client handles before the mpv core in Destroy()
Destroy() called mpv_destroy(MainHandle) (the core) before mpv_destroy(Handle) (the client handle created by mpv_create_client). Destroying the core first leaves the client handle pointing at freed memory; the subsequent mpv_destroy(Handle) is a use-after-destroy.
Reordered so the client handle (and any extra clients in Clients) are destroyed first, then the core.