Chatterino / chatterino2

Chat client for https://twitch.tv
MIT License
1.97k stars 442 forks source link

fix: check state when completing commands #5401

Closed Nerixyz closed 2 weeks ago

Nerixyz commented 1 month ago

A plugin with invalid metadata (e.g. a plugin for testing #5383 loaded in a regular version) will cause a segfault when completing commands, because its state is nullptr. This adds a check for the state. There should probably a method like isLoaded or isEnabled or isEnabledAndLoaded that does these checks in the future, because currently, even disabled plugins will be checked for completions (they don't have any completion callback, so it's fine [for now]).