1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 06:24:58 +00:00

Taskbar: Fix bug where dropping item in quick launch widget would crash

This commit is contained in:
Bastiaan van der Plaat 2024-01-30 22:11:01 +01:00 committed by Sam Atkins
parent 00ab8e0a14
commit 706a741053

View file

@ -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()));
}