diff options
Diffstat (limited to 'src')
-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"] |