command might be None after hook processors are through with it

This commit is contained in:
Gina Häußge committed 2014-11-10 16:39:20 +01:00
1 parent 23bc6b8df7
commit 19ba3b1f99
1 file changed
+1 -1
@@ -884,7 +884,7 @@ class RepRapProtocol(Protocol):
for hook in self._gcode_hooks[phase]:
command, with_line_number = hook(self, command, with_line_number)
if phase in self._preprocessors and command.command in self._preprocessors[phase]:
if phase in self._preprocessors and command is not None and command.command in self._preprocessors[phase]:
command, with_line_number = self._preprocessors[phase][command.command](command, with_line_number)
return command, with_line_number