Skip to content

Update IPlugin reference on cmd hook removal#1439

Merged
Headline merged 1 commit intomasterfrom
fix-cmditer-crash
Mar 10, 2021
Merged

Update IPlugin reference on cmd hook removal#1439
Headline merged 1 commit intomasterfrom
fix-cmditer-crash

Conversation

@Headline
Copy link
Member

@Headline Headline commented Mar 9, 2021

Fixes #1387

When two separate plugins hook the same cmd and one of those plugins are unloaded (or reloaded), then the IPlugin reference is never updated on the CmdInfo object, therefore when we try to get the plugin handle afterwards we explode. This patch identifies plugins on the hook level as well, that way when the owning plugin is unloaded we can update the IPlugin reference to the next hook in line.

@Headline Headline added the Bug general bugs; can be anything label Mar 9, 2021
@Headline Headline force-pushed the fix-cmditer-crash branch from 05d7bc1 to 75d43a6 Compare March 9, 2021 00:23
Copy link
Member

@dvander dvander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks!

@Headline Headline merged commit 99c39b1 into master Mar 10, 2021
@Headline Headline deleted the fix-cmditer-crash branch March 10, 2021 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug general bugs; can be anything

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CommandIterator crashing SRCDS - [SM] Exception reported: Could not read Handle xxxxx (error 4)

2 participants