From 2da4cfcc80b5fcd322c5194a829b76571616e5b4 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 6 Nov 2021 11:52:35 +0100 Subject: LibGfx: Use ErrorOr for Bitmap::clone() --- Userland/Libraries/LibCards/Card.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Userland/Libraries/LibCards/Card.cpp') diff --git a/Userland/Libraries/LibCards/Card.cpp b/Userland/Libraries/LibCards/Card.cpp index 2c27912d86..78b53a5361 100644 --- a/Userland/Libraries/LibCards/Card.cpp +++ b/Userland/Libraries/LibCards/Card.cpp @@ -172,8 +172,7 @@ void Card::clear_and_draw(GUI::Painter& painter, const Color& background_color) NonnullRefPtr Card::invert_bitmap(Gfx::Bitmap& bitmap) { - auto inverted_bitmap = bitmap.clone(); - VERIFY(inverted_bitmap); + auto inverted_bitmap = bitmap.clone().release_value_but_fixme_should_propagate_errors(); for (int y = 0; y < inverted_bitmap->height(); y++) { for (int x = 0; x < inverted_bitmap->width(); x++) { inverted_bitmap->set_pixel(x, y, inverted_bitmap->get_pixel(x, y).inverted()); -- cgit v1.2.3