From 5af502491bc84fbdcb57bda5a1b075f2ac5481bd Mon Sep 17 00:00:00 2001 From: Bob Swift Date: Fri, 25 Jun 2021 17:37:19 -0600 Subject: [PATCH] Fix crash after deleting the last profile in the list --- picard/ui/profileeditor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/picard/ui/profileeditor.py b/picard/ui/profileeditor.py index ceb759f2b..0d763335d 100644 --- a/picard/ui/profileeditor.py +++ b/picard/ui/profileeditor.py @@ -261,7 +261,8 @@ class ProfileEditorDialog(SingletonDialog, PicardDialog): """Set tree list highlight bar to proper line if selection change canceled. """ item = self.ui.profile_list.currentItem() - item.setSelected(True) + if item: + item.setSelected(True) self.update_profile_changed_message() def set_current_item(self, item):