1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:18:12 +00:00

LibPDF: Make DeviceCMYKColorSpace::the() fallible

No behavior change.
This commit is contained in:
Nico Weber 2024-01-30 20:59:50 -05:00 committed by Andrew Kaster
parent 79b73b7fbb
commit f840fb6b4e
3 changed files with 5 additions and 5 deletions

View file

@ -695,14 +695,14 @@ RENDERER_HANDLER(set_painting_color_and_space_to_rgb)
RENDERER_HANDLER(set_stroking_color_and_space_to_cmyk)
{
state().stroke_color_space = DeviceCMYKColorSpace::the();
state().stroke_color_space = TRY(DeviceCMYKColorSpace::the());
state().stroke_style = TRY(state().stroke_color_space->style(args));
return {};
}
RENDERER_HANDLER(set_painting_color_and_space_to_cmyk)
{
state().paint_color_space = DeviceCMYKColorSpace::the();
state().paint_color_space = TRY(DeviceCMYKColorSpace::the());
state().paint_style = TRY(state().paint_color_space->style(args));
return {};
}