Skip to content

Commit

Permalink
dock: Close docks earlier
Browse files Browse the repository at this point in the history
Close at OBS_FRONTEND_EVENT_SCRIPTING_SHUTDOWN so that the docks will be
closed just after the browser docks are closed.
This might reduce the possibility of crash at exit.
  • Loading branch information
norihiro committed Jun 7, 2023
1 parent 40e2827 commit f746588
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/scope-dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,11 @@ static void save_load_scope_docks(obs_data_t *save_data, bool saving, void *)

static void frontend_event(enum obs_frontend_event event, void *)
{
if (event == OBS_FRONTEND_EVENT_SCENE_COLLECTION_CLEANUP || event == OBS_FRONTEND_EVENT_EXIT) {
if (
#if LIBOBS_API_VER >= MAKE_SEMANTIC_VERSION(28, 0, 0)
event == OBS_FRONTEND_EVENT_SCRIPTING_SHUTDOWN ||
#endif
event == OBS_FRONTEND_EVENT_SCENE_COLLECTION_CLEANUP || event == OBS_FRONTEND_EVENT_EXIT) {
close_all_docks();
}
}
Expand Down

0 comments on commit f746588

Please sign in to comment.