Skip to content

Conversation

@CookStar
Copy link
Contributor

@CookStar CookStar commented Feb 11, 2021

UnhookAllFunctions releases all m_pCallingConventions, but CFunctions held by AutoUnload such as EntityPreHook are not yet released, causing segmentation fault.

else if (m_eCallingConvention != CONV_CUSTOM && !dynamic_cast<ICallingConventionWrapper *>(m_pCallingConvention))

UnhookAllFunctions has been moved to the end to deal with this.

@jordanbriere
Copy link
Contributor

Thanks, I was able to reproduce (not the crash, but the behaviours which I can see randomly leading to one). This also fixes potential issues if a plugin was dumb enough to register hooks in its unload method.

@jordanbriere jordanbriere merged commit bb0a3e8 into Source-Python-Dev-Team:master Feb 11, 2021
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.

2 participants