Skip to content
This repository was archived by the owner on Jan 12, 2022. It is now read-only.

Prevent NativeVote menu callback from freeing in-use forward handle#3

Open
nosoop wants to merge 1 commit intopowerlord:masterfrom
nosoop:prevent-concurrent-forward-delete
Open

Prevent NativeVote menu callback from freeing in-use forward handle#3
nosoop wants to merge 1 commit intopowerlord:masterfrom
nosoop:prevent-concurrent-forward-delete

Conversation

@nosoop
Copy link

@nosoop nosoop commented Jul 10, 2019

Quick-fix while alliedmodders/sourcemod#1041 gets sorted out.

SourceMod doesn't seem to take kindly to a forward handle being deleted while it's being invoked, which is what Handler_NV_MapVoteMenu does with NativeVote.Clear() in nativevotes_mapchooser.sp. This seemingly didn't have disastrous consequences until Debian 10.

All this does is ensure that the handle remains valid for the duration of the private forward call.

Increments the refcount of the private forward.  This prevents a crash on Debian 10 and doesn't seem like well-defined behavior.
@Naleksuh
Copy link

@powerlord pls

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants