forked from SerenityOS/serenity
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibPDF: In ColorSpace creation code, use resolve_to() more
For valid PDFs, this makes no difference. For invalid PDFs, we now assert during the cast in resolve_to() instead of returning a PDFError. However, most PDFs are valid, and even for invalid PDFs, we'd previously keep the old color space around when getting the PDF error and then usually assert later when the old color space got passed a color with an unexpected number of components (since the components were for the new color space). Doesn't affect any of the > 2000 PDFs I use for testing locally, is less code, and should make for less surprising asserts when it does happen.
- Loading branch information
Showing
1 changed file
with
10 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters