Skip to content

Commit fc07989

Browse files
committed
Fix project handle not being checked for when listing valid plugins
This caused project commands to throw when there valid callback was called outside the context of a project
1 parent fa7775a commit fc07989

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

python/plugin.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -914,6 +914,8 @@ def is_valid(self, context: PluginCommandContext):
914914
context.instruction.instr_index
915915
)
916916
elif self._command.type == PluginCommandType.ProjectPluginCommand:
917+
if context.project is None:
918+
return False
917919
if not self._command.projectIsValid:
918920
return True
919921
return self._command.projectIsValid(self._command.context, context.project.handle)

0 commit comments

Comments
 (0)