diff options
Diffstat (limited to 'src/value.c')
-rw-r--r-- | src/value.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/value.c b/src/value.c index 0e474fb..08c27e5 100644 --- a/src/value.c +++ b/src/value.c @@ -168,6 +168,9 @@ slv2_value_new_float(SLV2World world, float val) SLV2Value slv2_value_duplicate(SLV2Value val) { + if (val == NULL) + return val; + SLV2Value result = (SLV2Value)malloc(sizeof(struct _SLV2Value)); result->type = val->type; |