Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UI: Add cleanup of stats callback on window close
Moving the cleanup to OBS_FRONTEND_EVENT_EXIT in #8735 only handled the cleanup from the dockable window, as the regular stats window is deleted on close when the UI is shut down. This caused an event handler leak each time the window is manually closed, resulting in crashes. This code looks a bit wrong since we delete the same handler in multiple places, but this is due to the code being used by both the dock (non-closable) and the window (closable). The OBS_FRONTEND_EVENT_EXIT handler handles cleanup from the dockable stats window, and the window close handler now handles cleanup from the non-dockable stats window.
- Loading branch information