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

Crash while parsing command menu #1730

Open
SamVanheer opened this issue Jul 20, 2016 · 0 comments
Open

Crash while parsing command menu #1730

SamVanheer opened this issue Jul 20, 2016 · 0 comments

Comments

@SamVanheer
Copy link

If a commandmenu.txt file is provided, and contains an entry for a custom button that isn't handled by the game, it will still try to access the button, resulting in a null pointer exception.

If this call returns null:

pButton = CreateCustomButton( cText, cCommand, iButtonY );

then this call:

m_pCommandMenus[m_iNumMenus] = CreateSubMenu(pButton, m_pCurrentCommandMenu, iButtonY );

Will end up accessing a null pointer.

Adding a check there prevents a crash, but will likely result in parser failure later on (using SDK command menu code with TFC's command menu causes parser failure).

SamVanheer added a commit to twhl-community/halflife-updated that referenced this issue Sep 19, 2022
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

No branches or pull requests

1 participant