Skip to content

[GEN][ZH] Prevent game crash when starting a new game without a map#993

Merged
xezon merged 2 commits into
TheSuperHackers:mainfrom
xezon:xezon/fix-replay-load-crash-2
Jun 6, 2025
Merged

[GEN][ZH] Prevent game crash when starting a new game without a map#993
xezon merged 2 commits into
TheSuperHackers:mainfrom
xezon:xezon/fix-replay-load-crash-2

Conversation

@xezon

@xezon xezon commented Jun 1, 2025

Copy link
Copy Markdown

Merge with Rebase

This change fixes 2 null dereferences when attempting to load into a Replay whose map is missing. Loading in an empty map is not particularly useful, but it is better than crashing the game.

The first commit also fixes a warning from the MSVC static analyzer:

GeneralsMD\Code\GameEngine\Source\GameLogic\System\GameLogic.cpp(832): warning C6011: Dereferencing NULL pointer 'md'.

Loading into a Replay whose map is missing

shot_20250601_162723_2

@xezon xezon added this to the Stability fixes milestone Jun 1, 2025
@xezon xezon added Minor Severity: Minor < Major < Critical < Blocker Gen Relates to Generals ZH Relates to Zero Hour Stability Concerns stability of the runtime Crash This is a crash, very bad labels Jun 1, 2025
@xezon xezon requested a review from a team June 1, 2025 14:42
xezon added 2 commits June 1, 2025 16:42
…artPosition() when starting a new game without a map (#993)
…tNewGame() when starting a new game without a map (#993)
@xezon xezon merged commit 10b1f2c into TheSuperHackers:main Jun 6, 2025
18 checks passed
xezon added a commit that referenced this pull request Jun 6, 2025
…artPosition() when starting a new game without a map (#993)
@xezon xezon deleted the xezon/fix-replay-load-crash-2 branch June 6, 2025 20:53
fbraz3 pushed a commit to fbraz3/GeneralsX that referenced this pull request Nov 10, 2025
fbraz3 pushed a commit to fbraz3/GeneralsX that referenced this pull request Nov 10, 2025
fbraz3 pushed a commit to fbraz3/GeneralsX that referenced this pull request Feb 23, 2026
fbraz3 pushed a commit to fbraz3/GeneralsX that referenced this pull request Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Crash This is a crash, very bad Gen Relates to Generals Minor Severity: Minor < Major < Critical < Blocker Stability Concerns stability of the runtime ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants