« get me outta code hell

dotfiles - Miscellaneous configuration files of my personal use
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--apps/Sublime Text 4/Packages/User/HSMusic Editing.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/Sublime Text 4/Packages/User/HSMusic Editing.py b/apps/Sublime Text 4/Packages/User/HSMusic Editing.py
index 63e3dc3..bde61b0 100644
--- a/apps/Sublime Text 4/Packages/User/HSMusic Editing.py
+++ b/apps/Sublime Text 4/Packages/User/HSMusic Editing.py
@@ -6,6 +6,10 @@ import os
 class ProjectSpecificKeyBinding(sublime_plugin.EventListener):
   def on_query_context(self, view, key, operator, operand, match_all):
     current_project_name = view.window().project_file_name()
+
+    if not current_project_name:
+      return None
+
     if key != "project_name" and os.path.isfile(current_project_name):
       return None