Skip to content

Fix potential division by zero errors in W3DView dimension handling - #222

Open
seer-by-sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/w3dview-div-by-zero
Open

seer-by-sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/w3dview-div-by-zero

Conversation

@seer-by-sentry

@seer-by-sentry seer-by-sentry Bot commented Jan 5, 2026

Copy link
Copy Markdown

Fixes CLIENT-1PC. The issue was that: Aspect ratio calculation divides by zero display height during graphics driver initialization, causing fatal crash.

  • Added checks in W3DView dimension setting functions (setHeight, setWidth, setOrigin) to prevent division by zero if view or display dimensions are zero or negative, especially during initialization.
  • Added a check in GetMaxCameraHeight to ensure display height is positive before calculating the current aspect ratio.
  • Added a check in GetNormalizedRegion to ensure view width and height are positive before normalizing the screen region.

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

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

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