Skip to content

Commit

Permalink
Minor fixes to avoid crashes and instantiation errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
ntoll committed Oct 23, 2018
1 parent 9f78c31 commit e35fa81
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion securedrop_client/gui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def setup(self, controller):
"""
self.controller = controller # Reference the Client logic instance.
self.tool_bar.setup(self, controller)
self.main_view.setup(controller)

def autosize_window(self):
"""
Expand Down Expand Up @@ -143,7 +144,8 @@ def on_source_changed(self):
"""
source_item = self.main_view.source_list.currentItem()
source_widget = self.main_view.source_list.itemWidget(source_item)
self.show_conversation_for(source_widget.source)
if source_widget:
self.show_conversation_for(source_widget.source)

def show_conversation_for(self, source):
"""
Expand Down

0 comments on commit e35fa81

Please sign in to comment.