diff --git a/torchcwrap.lua b/torchcwrap.lua index 7c918b34..09f9dec0 100644 --- a/torchcwrap.lua +++ b/torchcwrap.lua @@ -95,7 +95,7 @@ types.Generator = { end, declare = function(arg) - return string.format("THGenerator * arg%d;", arg.i) + return string.format("THGenerator *arg%d = NULL;", arg.i) end, check = function(arg, idx)