diff options
Diffstat (limited to 'Userland/Services/Taskbar/TaskbarWindow.cpp')
-rw-r--r-- | Userland/Services/Taskbar/TaskbarWindow.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Userland/Services/Taskbar/TaskbarWindow.cpp b/Userland/Services/Taskbar/TaskbarWindow.cpp index 38a0417f3a..624e9eca4c 100644 --- a/Userland/Services/Taskbar/TaskbarWindow.cpp +++ b/Userland/Services/Taskbar/TaskbarWindow.cpp @@ -310,8 +310,11 @@ void TaskbarWindow::wm_event(GUI::WMEvent& event) if (icon->height() != taskbar_icon_size() || icon->width() != taskbar_icon_size()) { auto sw = taskbar_icon_size() / (float)icon->width(); auto sh = taskbar_icon_size() / (float)icon->height(); - auto scaled_bitmap = icon->scaled(sw, sh); - window->button()->set_icon(move(scaled_bitmap)); + auto scaled_bitmap_or_error = icon->scaled(sw, sh); + if (scaled_bitmap_or_error.is_error()) + window->button()->set_icon(nullptr); + else + window->button()->set_icon(scaled_bitmap_or_error.release_value()); } else { window->button()->set_icon(icon); } |