diff options
author | Joe Rayhawk <jrayhawk@fairlystable.org> | 2023-08-17 18:41:43 -0700 |
---|---|---|
committer | Joe Rayhawk <jrayhawk@fairlystable.org> | 2023-08-17 18:44:51 -0700 |
commit | 2192354e68b27b2c287a49f8cef73afad5ca98a7 (patch) | |
tree | 3c449e2fc7d0130feb3ba6158dbba6024c4d7ff5 | |
parent | f7b6daf551ff4bcd03980dfa593b6f8a8e3075d0 (diff) | |
download | crystal-obs-websocket-2192354e68b27b2c287a49f8cef73afad5ca98a7.tar.gz crystal-obs-websocket-2192354e68b27b2c287a49f8cef73afad5ca98a7.zip |
SourceFilterRemoved: Support out-of-order InputRemoved
-rw-r--r-- | src/obswebsocket.cr | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/obswebsocket.cr b/src/obswebsocket.cr index d3432f4..33b4244 100644 --- a/src/obswebsocket.cr +++ b/src/obswebsocket.cr @@ -361,7 +361,9 @@ module OBS # This could probably be made more efficient using the eventData when "SourceFilterRemoved" edata = d["eventData"] - self.sources[edata["sourceName"].as_s].filters.deletecache() + if self.sources[edata["sourceName"].as_s]? # this event arrives *after* InputRemoved sometimes, so this source might not exist + self.sources[edata["sourceName"].as_s].filters.deletecache() + end # This could probably be made more efficient using the eventData when "SourceFilterNameChanged" edata = d["eventData"] |