Fix crash after deleting the last profile in the list

This commit is contained in:
Bob Swift
2021-06-25 17:37:19 -06:00
parent 150eb403ae
commit 5af502491b

View File

@@ -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):