diff --git a/lib/utils/websocket-api.cpp b/lib/utils/websocket-api.cpp index 9e33ec52..c3e53c86 100644 --- a/lib/utils/websocket-api.cpp +++ b/lib/utils/websocket-api.cpp @@ -127,9 +127,10 @@ void RegisterWebsocketRequest( void SendWebsocketVendorEvent(const std::string &eventName, obs_data_t *data) { - if (OBSIsShuttingDown()) { + if (OBSIsShuttingDown() || !obs_get_module("obs-websocket")) { return; } + obs_websocket_vendor_emit_event(vendor, eventName.c_str(), data); }