mirror of
https://github.com/markqvist/NomadNet.git
synced 2024-12-23 22:29:28 -05:00
Fix bug where Nomadnet crashes on empty lists
This commit is contained in:
parent
f4e3f1cb46
commit
4ec1a4979f
@ -110,7 +110,10 @@ class ConversationsDisplay():
|
||||
|
||||
def delete_selected_conversation(self):
|
||||
self.dialog_open = True
|
||||
source_hash = self.ilb.get_selected_item().source_hash
|
||||
item = self.ilb.get_selected_item()
|
||||
if item == None:
|
||||
return
|
||||
source_hash = item.source_hash
|
||||
|
||||
def dismiss_dialog(sender):
|
||||
self.update_conversation_list()
|
||||
@ -140,7 +143,10 @@ class ConversationsDisplay():
|
||||
def edit_selected_in_directory(self):
|
||||
g = self.app.ui.glyphs
|
||||
self.dialog_open = True
|
||||
source_hash_text = self.ilb.get_selected_item().source_hash
|
||||
item = self.ilb.get_selected_item()
|
||||
if item == None:
|
||||
return
|
||||
source_hash_text = item.source_hash
|
||||
display_name = self.ilb.get_selected_item().display_name
|
||||
if display_name == None:
|
||||
display_name = ""
|
||||
|
Loading…
Reference in New Issue
Block a user