core (memory/param): don't crash when getting unset int value

This commit is contained in:
Goffi 2021-11-30 17:28:03 +01:00
commit 97f6d1010a

View file

@ -415,7 +415,7 @@ class Params(object):
if node.getAttribute("type") == "bool":
return C.bool(value_to_use)
if node.getAttribute("type") == "int":
return int(value_to_use)
return int(value_to_use) if value_to_use else value_to_use
elif node.getAttribute("type") == "list":
if (
not value_to_use