Skip to content

Commit

Permalink
Only close LV model if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeSullivan7 committed Nov 15, 2024
1 parent c0db0d3 commit 49c4cb4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mantidimaging/gui/windows/live_viewer/presenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ def __init__(self, view: LiveViewerWindowView, main_window: MainWindowView):

def close(self) -> None:
"""Close the window."""
self.model.close()
if self.model is not None:
self.model.close()
self.model = None # type: ignore # Presenter instance to be destroyed -type can be inconsistent
self.view = None # type: ignore # Presenter instance to be destroyed -type can be inconsistent

Expand Down

0 comments on commit 49c4cb4

Please sign in to comment.