Index: tools/json_schema_compiler/cpp_type_generator.py |
diff --git a/tools/json_schema_compiler/cpp_type_generator.py b/tools/json_schema_compiler/cpp_type_generator.py |
index 186a6167b754281b81325e84428e97992967d755..cad64ae37d3cb64150c8d645c108fd3fde90d687 100644 |
--- a/tools/json_schema_compiler/cpp_type_generator.py |
+++ b/tools/json_schema_compiler/cpp_type_generator.py |
@@ -189,8 +189,9 @@ class CppTypeGenerator(object): |
for function in self._namespace.functions.values(): |
for param in function.params: |
dependencies |= self._PropertyTypeDependencies(param) |
- for param in function.callback.params: |
- dependencies |= self._PropertyTypeDependencies(param) |
+ if function.callback: |
+ for param in function.callback.params: |
+ dependencies |= self._PropertyTypeDependencies(param) |
for type_ in self._namespace.types.values(): |
for prop in type_.properties.values(): |
dependencies |= self._PropertyTypeDependencies(prop) |