Skip to content

Commit

Permalink
Fix crash because view.file_name() is None for console view
Browse files Browse the repository at this point in the history
Fix #46
  • Loading branch information
timonwong committed Feb 20, 2014
1 parent b70ffbc commit 41f01e6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion OmniMarkupLib/RendererManager.py
Expand Up @@ -368,7 +368,12 @@ def revive_buffer(cls, revivable_key):
revivable_key = base64.b64decode(revivable_key).decode('utf-8')
for window in sublime.windows():
for view in window.views():
if filesystem_path_equals(view.file_name(), revivable_key):
file_name = view.file_name()
# NOTE: Since file_name is None for console view, so we just
# ignore it
if file_name is None:
continue
if filesystem_path_equals(file_name, revivable_key):
return view.buffer_id()
return None

Expand Down

0 comments on commit 41f01e6

Please sign in to comment.