diff options
Diffstat (limited to 'gobject/valaccodebasemodule.vala')
-rw-r--r-- | gobject/valaccodebasemodule.vala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gobject/valaccodebasemodule.vala b/gobject/valaccodebasemodule.vala index 069be00ce..908b257d8 100644 --- a/gobject/valaccodebasemodule.vala +++ b/gobject/valaccodebasemodule.vala @@ -3764,6 +3764,9 @@ internal class Vala.CCodeBaseModule : CCodeModule { ccheck.add_argument (cexpr); } else if (!non_null) { return null; + } else if (t == glist_type || t == gslist_type) { + // NULL is empty list + return null; } else { var cnonnull = new CCodeBinaryExpression (CCodeBinaryOperator.INEQUALITY, new CCodeIdentifier (var_name), new CCodeConstant ("NULL")); ccheck.add_argument (cnonnull); |