Skip to content

Fix potential null dereference in W3DView terrain update#423

Open
seer-by-sentry[bot] wants to merge 1 commit intomainfrom
seer/fix/w3dview-terrain-update-null-check
Open

Fix potential null dereference in W3DView terrain update#423
seer-by-sentry[bot] wants to merge 1 commit intomainfrom
seer/fix/w3dview-terrain-update-null-check

Conversation

@seer-by-sentry
Copy link
Copy Markdown

Fixes CLIENT-2V8. The issue was that: HeightMapRenderObjClass::updateCenter dereferences a NULL pLightsIterator, which was returned by createLightsIterator without validation.

  • Moved the call to TheTerrainRenderObject->updateCenter inside the if (it) block.
  • Ensures that the terrain update function is only called when a valid light iterator is available.
  • Prevents a potential null pointer dereference if createLightsIterator() returns null.

This fix was generated by Seer in Sentry, triggered automatically. 👁️ Run ID: 12412431

Not quite right? Click here to continue debugging with Seer.

@github-actions
Copy link
Copy Markdown

⚠️ Title/Commit Validation Failed

Invalid PR title:

  • Fix potential null dereference in W3DView terrain update

Invalid commit messages:

  • Fix potential null dereference in W3DView terrain update
    PR titles and commit messages must follow conventional commits format:
type: Description
type(scope): Description

Allowed types: bugfix, build, chore, ci, docs, fix, feat, perf, refactor, revert, style, test, tweak, unify

See CONTRIBUTING.md for details.

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.

0 participants