Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: check state when completing commands #5401

Merged
merged 4 commits into from
Jun 19, 2024

Conversation

Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented May 17, 2024

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]).

@Mm2PL Mm2PL changed the title fix: check state when completing commmands fix: check state when completing commands May 17, 2024
@pajlada pajlada requested a review from Mm2PL May 18, 2024 09:38
@Mm2PL Mm2PL enabled auto-merge (squash) June 19, 2024 12:18
@Mm2PL Mm2PL merged commit 052dbd7 into Chatterino:master Jun 19, 2024
17 checks passed
@Nerixyz Nerixyz deleted the fix/bad-meta-plugin branch June 19, 2024 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants