diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2023-01-11 16:20:17 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-01-12 11:25:51 +0100 |
commit | a15d44f019dc60b001c565ce0b940cc87024dbfd (patch) | |
tree | 173e3568bff54713fbe7444fd20eada916287f5e /Userland/Applications/MouseSettings/HighlightPreviewWidget.cpp | |
parent | 1d4f287582f43acfd76661d20bc2915455809f41 (diff) | |
download | serenity-a15d44f019dc60b001c565ce0b940cc87024dbfd.zip |
LibCore+Userland: Make Core::Timer::create_repeating() return ErrorOr
The FIXMEs must flow!
Diffstat (limited to 'Userland/Applications/MouseSettings/HighlightPreviewWidget.cpp')
-rw-r--r-- | Userland/Applications/MouseSettings/HighlightPreviewWidget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Applications/MouseSettings/HighlightPreviewWidget.cpp b/Userland/Applications/MouseSettings/HighlightPreviewWidget.cpp index 8501aceba4..7699d29725 100644 --- a/Userland/Applications/MouseSettings/HighlightPreviewWidget.cpp +++ b/Userland/Applications/MouseSettings/HighlightPreviewWidget.cpp @@ -37,10 +37,10 @@ ErrorOr<void> HighlightPreviewWidget::reload_cursor() m_cursor_params = Gfx::CursorParams::parse_from_filename(cursor_path, m_cursor_bitmap->rect().center()).constrained(*m_cursor_bitmap); // Setup cursor animation: if (m_cursor_params.frames() > 1 && m_cursor_params.frame_ms() > 0) { - m_frame_timer = Core::Timer::create_repeating(m_cursor_params.frame_ms(), [&] { + m_frame_timer = TRY(Core::Timer::create_repeating(m_cursor_params.frame_ms(), [&] { m_cursor_frame = (m_cursor_frame + 1) % m_cursor_params.frames(); update(); - }); + })); m_frame_timer->start(); } else { m_frame_timer = nullptr; |