LibPDF: Use original error for failing ICC load

This commit is contained in:
Nico Weber 2024-02-20 14:59:21 -05:00 committed by Andreas Kling
commit 3b616b6af8
Notes: sideshowbarker 2024-07-18 03:20:18 +09:00

View file

@ -506,7 +506,7 @@ PDFErrorOr<NonnullRefPtr<ColorSpace>> ICCBasedColorSpace::create(Document* docum
return Error { Error::Type::Internal, "Alternate color spaces in array format are not supported" };
}
return Error { Error::Type::MalformedPDF, "Failed to load ICC color space with malformed profile and no alternate" };
return maybe_profile.release_error();
}
ICCBasedColorSpace::ICCBasedColorSpace(NonnullRefPtr<Gfx::ICC::Profile> profile)