Skip to content

fix: clean up DIB allocation failures#4

Open
sit-d wants to merge 1 commit into
bitRAKE:mainfrom
sit-d:curation/dib-failure-cleanup-2026-07-06
Open

fix: clean up DIB allocation failures#4
sit-d wants to merge 1 commit into
bitRAKE:mainfrom
sit-d:curation/dib-failure-cleanup-2026-07-06

Conversation

@sit-d

@sit-d sit-d commented Jul 6, 2026

Copy link
Copy Markdown

Summary

  • clear the stale selected-bitmap handle after replacing an existing DIB cache
  • release a partially-created DIB section if CreateDIBSection or CreateCompatibleDC fails
  • reset cache dimensions on failure so later paints do not see stale buffer metadata

Verification

  • Ad-hoc source check confirmed the dib_resize failure paths release partial allocations and reset cache state.
  • git diff --check HEAD -- iterator_gdi.c passed.

Notes

  • Full Windows GDI build/runtime validation was not run in this Linux environment.

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