Skip to content

Commit

Permalink
check if view.window() is not None
Browse files Browse the repository at this point in the history
  • Loading branch information
randy3k committed Feb 11, 2019
1 parent 06fd3ae commit d3b4c49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions origami.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def carry_file_to_pane(self, direction, create_new_if_necessary=False):
views_in_group = window.views_in_group(active_group)
window.set_view_index(view, active_group, len(views_in_group))
sublime.set_timeout(lambda: window.focus_view(view))


def clone_file_to_pane(self, direction, create_new_if_necessary=False):
window = self.window
Expand Down Expand Up @@ -753,7 +753,7 @@ def is_tabless_view(self, view):
If we think it's this kind of view, return True."""
if sublime.version()[0] == '2':
return False
elif view.window().get_view_index(view)[1] == -1:
elif view.window() and view.window().get_view_index(view)[1] == -1:
return True
return False

Expand Down

0 comments on commit d3b4c49

Please sign in to comment.