File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,20 @@ EventHandler::~EventHandler()
54
54
blog (LOG_ERROR, " [EventHandler::~EventHandler] Unable to get libobs signal handler!" );
55
55
}
56
56
57
+ // Revoke callbacks of all inputs and scenes, in case some still have our callbacks attached
58
+ auto enumInputs = [](void *param, obs_source_t *source) {
59
+ auto eventHandler = static_cast <EventHandler *>(param);
60
+ eventHandler->DisconnectSourceSignals (source);
61
+ return true ;
62
+ };
63
+ obs_enum_sources (enumInputs, this );
64
+ auto enumScenes = [](void *param, obs_source_t *source) {
65
+ auto eventHandler = static_cast <EventHandler *>(param);
66
+ eventHandler->DisconnectSourceSignals (source);
67
+ return true ;
68
+ };
69
+ obs_enum_scenes (enumScenes, this );
70
+
57
71
blog_debug (" [EventHandler::~EventHandler] Finished." );
58
72
}
59
73
You can’t perform that action at this time.
0 commit comments