Skip to content

fix(controlbar): Prevent null derefence in ControlBar::showRallyPoint() if the "RallyPointMarker" was not defined in INI - #3304

Open
CryoTheRenegade wants to merge 4 commits into
TheSuperHackers:mainfrom
CryoTheRenegade:bugfix/clang-tidy-rally-marker-null
Open

CryoTheRenegade wants to merge 4 commits into
TheSuperHackers:mainfrom
CryoTheRenegade:bugfix/clang-tidy-rally-marker-null

Conversation

@CryoTheRenegade

Copy link
Copy Markdown

Rally marker creation or lookup can fail. The debug assertion does not protect release builds.

Found by clang-tidy

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 185ce662-a6bf-433f-8126-41c6777f2e74

📥 Commits

Reviewing files that changed from the base of the PR and between 3919be4 and 2880cfd.

📒 Files selected for processing (1)
  • Core/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp
💤 Files with no reviewable changes (1)
  • Core/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


Walkthrough

ControlBar::showRallyPoint now exits when the marker template is missing. It also removes the post-creation null guard and configures the created drawable after the assertion.

Changes

Rally Point Handling

Layer / File(s) Summary
Marker creation handling
Core/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp
showRallyPoint returns when RallyPointMarker is unavailable. After drawable creation, it configures and stores the result following the assertion.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 2880c

No confirmed unresolved behavior risk remains in the rally marker change.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the ControlBar null-dereference fix when the "RallyPointMarker" is undefined. It accurately describes the main change despite a minor spelling error in "derefence".
Description check ✅ Passed The description directly explains that rally marker creation or lookup can fail and that the debug assertion does not protect release builds. It matches the changeset and objectives.

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Sep 16, 2026

Copy link
Copy Markdown
Greptile Summary

The PR makes rally-marker creation return safely when the RallyPointMarker template cannot be found. The latest revision removes a redundant implementation-history comment without changing the guard or its behavior.

  • Checks the template lookup before creating the drawable.
  • Leaves the documented throwing behavior of newDrawable unchanged.
  • No new actionable issues were identified in the changes since the previous review.
Confidence Score: 5/5

The PR appears safe to merge because the latest change is comment-only and all previous review threads are resolved.

No new correctness, security, or repository-rule issues were identified, and neither resolved previous finding remains in the scoring set.

Important Files Changed
Filename Overview
Core/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp Adds a missing-template guard to rally-point marker creation and removes a redundant bug-fix annotation.

Reviews (4): Last reviewed commit: "style(ControlBar): Remove redundant rall..." | Re-trigger Greptile

Comment thread Core/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp Outdated
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

@xezon xezon left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fix does not make much sense. Assert and runtime conditions and typically mutually exclusive.

Assert will hit when out of memory, which is a legitimate crash point.

Comment thread Core/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp Outdated
Comment thread Core/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp Outdated
Comment thread Core/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp
@xezon xezon added Minor Severity: Minor < Major < Critical < Blocker Fix Is fixing something, but is not user facing labels Sep 16, 2026
@coderabbitai
coderabbitai Bot requested a review from xezon September 16, 2026 16:05
Comment thread Core/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp
Comment thread Core/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp Outdated
@CryoTheRenegade

Copy link
Copy Markdown
Author

@coderabbitai resume

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

@xezon xezon left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks robust enough

@xezon xezon changed the title fix(ControlBar): Return if marker is null. fix(controlbar): Prevent null derefence in ControlBar::showRallyPoint() if the "RallyPointMarker" was not defined in INI Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Fix Is fixing something, but is not user facing Minor Severity: Minor < Major < Critical < Blocker

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants