summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCards/Card.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-11-06 11:52:35 +0100
committerAndreas Kling <kling@serenityos.org>2021-11-08 00:35:27 +0100
commit2da4cfcc80b5fcd322c5194a829b76571616e5b4 (patch)
treebe401c53feed6f52e74033c02879543ef1f9fd12 /Userland/Libraries/LibCards/Card.cpp
parentc417820bff1b24843359800b41bcec8c8fbd5788 (diff)
downloadserenity-2da4cfcc80b5fcd322c5194a829b76571616e5b4.zip
LibGfx: Use ErrorOr<T> for Bitmap::clone()
Diffstat (limited to 'Userland/Libraries/LibCards/Card.cpp')
-rw-r--r--Userland/Libraries/LibCards/Card.cpp3
1 files changed, 1 insertions, 2 deletions
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<Gfx::Bitmap> 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());