Skip to content

SurfaceClass: Add validity checks for D3D surface before operations - #64

Merged
x64-dev merged 1 commit into
mainfrom
seer/surfaceclass-validity-checks
Oct 10, 2025
Merged

SurfaceClass: Add validity checks for D3D surface before operations#64
x64-dev merged 1 commit into
mainfrom
seer/surfaceclass-validity-checks

Conversation

@seer-by-sentry

Copy link
Copy Markdown

Fixes CLIENT-EW. The issue was that: Direct3D surface creation failure propagates a null pointer, causing an access violation when SurfaceClass::Lock attempts dereference.

  • Added Is_Valid() method to SurfaceClass to check the underlying D3D surface.
  • Added checks for D3D surface validity before performing operations like Get_Description, Lock, Unlock, Clear, Copy, CreateCopy, CopyRect, CopyCol, FindBB, Is_Transparent_Column, Get_Pixel, DrawPixel, DrawHLine, Is_Monochrome, and Hue_Shift.
  • Added checks in Render2DSentence to ensure the surface is valid after creation and before locking, handling potential failures gracefully.

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

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

@x64-dev
x64-dev merged commit 1624e67 into main Oct 10, 2025
5 checks passed
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.

1 participant