From 706a74105336e78e2f257bfa95f8299ab0c2e698 Mon Sep 17 00:00:00 2001 From: Bastiaan van der Plaat Date: Tue, 30 Jan 2024 22:11:01 +0100 Subject: [PATCH] Taskbar: Fix bug where dropping item in quick launch widget would crash --- Userland/Services/Taskbar/QuickLaunchWidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Userland/Services/Taskbar/QuickLaunchWidget.cpp b/Userland/Services/Taskbar/QuickLaunchWidget.cpp index 9f25eeb3f2..3e87a5a2ba 100644 --- a/Userland/Services/Taskbar/QuickLaunchWidget.cpp +++ b/Userland/Services/Taskbar/QuickLaunchWidget.cpp @@ -182,7 +182,8 @@ void QuickLaunchWidget::drop_event(GUI::DropEvent& event) auto path = url.serialize_path(); auto entry = QuickLaunchEntry::create_from_path(path); if (entry) { - auto result = update_entry(entry->name(), entry.release_nonnull()); + auto entry_name = entry->name(); + auto result = update_entry(entry_name, entry.release_nonnull()); if (result.is_error()) GUI::MessageBox::show_error(window(), ByteString::formatted("Failed to add quick launch entry: {}", result.release_error())); }