Skip to content

[ZH] Remove unnecessary NULL pointer tests in ..CrateCollide::executeCrateBehavior() #1109

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

Merged
merged 1 commit into from
Jun 20, 2025

Conversation

xezon
Copy link

@xezon xezon commented Jun 19, 2025

This change removes unnecessary NULL pointer tests in ..CrateCollide::executeCrateBehavior() and makes the compiler happy.

Zero Hour only.

GeneralsMD\Code\GameEngine\Source\GameLogic\Object\Collide\CrateCollide\SabotageSupplyCenterCrateCollide.cpp(167): warning C6011: Dereferencing NULL pointer 'other'. See line 134 for an earlier location where this can occur
GeneralsMD\Code\GameEngine\Source\GameLogic\Object\Collide\CrateCollide\SabotageSupplyDropzoneCrateCollide.cpp(177): warning C6011: Dereferencing NULL pointer 'other'. See line 137 for an earlier location where this can occur

@xezon xezon added Minor Severity: Minor < Major < Critical < Blocker Refactor Improves the structure of the code, with negligible changes in function. labels Jun 19, 2025
Copy link

@roossienb roossienb left a comment

Choose a reason for hiding this comment

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

This looks ok

@xezon xezon force-pushed the xezon/staticanalysis2/021 branch from f35a2ab to 9d7612c Compare June 20, 2025 07:34
@xezon xezon merged commit 2389b09 into TheSuperHackers:main Jun 20, 2025
9 checks passed
@xezon xezon deleted the xezon/staticanalysis2/021 branch June 20, 2025 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Minor Severity: Minor < Major < Critical < Blocker Refactor Improves the structure of the code, with negligible changes in function.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants