Skip to content

Commit

Permalink
Check for None
Browse files Browse the repository at this point in the history
  • Loading branch information
Esteve Fernandez authored and wjwwood committed Mar 4, 2015
1 parent b09b7a4 commit e5cde77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rosidl_generator_py/resource/msg-py.py.template
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class @(spec.base_type.type):
def materialize(self):
handle = @(spec.base_type.pkg_name)_@(spec.base_type.type)_c.create()
@[for field in spec.fields]
if self.@(field.name):
if self.@(field.name) is not None:
@[if field.type.is_primitive_type()]
@(spec.base_type.pkg_name)_@(spec.base_type.type)_c.set_@(field.name)(handle, self.@(field.name))
@[else]
Expand Down

0 comments on commit e5cde77

Please sign in to comment.