summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Userland/Applets/ClipboardHistory/main.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Applets/ClipboardHistory/main.cpp b/Userland/Applets/ClipboardHistory/main.cpp
index cc2ed9a054..e8858a67dc 100644
--- a/Userland/Applets/ClipboardHistory/main.cpp
+++ b/Userland/Applets/ClipboardHistory/main.cpp
@@ -43,6 +43,9 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
};
auto delete_action = GUI::CommonActions::make_delete_action([&](const GUI::Action&) {
+ if (table_view->selection().is_empty())
+ return;
+
model->remove_item(table_view->selection().first().row());
});