Skip to content

fix(pdfx): guard page and visiblePages after viewer detach/dispose - #4

Closed
Deni-al wants to merge 1 commit into
ovenbits:messengerxfrom
Deni-al:fix/pdfx-dispose-guards
Closed

Deni-al wants to merge 1 commit into
ovenbits:messengerxfrom
Deni-al:fix/pdfx-dispose-guards

Conversation

@Deni-al

@Deni-al Deni-al commented Sep 10, 2026

Copy link
Copy Markdown

Summary

  • Guard page and visiblePages when PdfViewPinch is detached or PdfController PageController is unavailable
  • Call _detach() in dispose() to prevent null-check crashes during dispose races (MOBILE-4B2 / 704)

Test plan

  • Open PDF reader, navigate pages, close quickly
  • Verify no Sentry null-check crashes on dispose

Made with Cursor

Return safe defaults when PdfViewPinch is detached or PdfController
PageController is unavailable, preventing null-check crashes during
dispose races (MOBILE-4B2 / 704).

Co-authored-by: Cursor <cursoragent@cursor.com>
@Deni-al

Deni-al commented Sep 10, 2026

Copy link
Copy Markdown
Author

Closing as duplicate of #3 — same pdfx controller dispose guards (MOBILE-4B2 / 704). Please review and merge #3 instead.

@Deni-al

Deni-al commented Sep 10, 2026

Copy link
Copy Markdown
Author

Duplicate of #3.

@Deni-al Deni-al closed this Sep 10, 2026
@Deni-al

Deni-al commented Sep 10, 2026

Copy link
Copy Markdown
Author

Closing as duplicate of #3 — same pdfx controller dispose guards (MOBILE-4B2 / 704). Please review and merge #3 instead.

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