]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Do not add null-check for SimpleType structs
authorLuca Bruno <lucabru@src.gnome.org>
Tue, 30 Aug 2011 07:51:02 +0000 (09:51 +0200)
committerLuca Bruno <lucabru@src.gnome.org>
Tue, 30 Aug 2011 07:51:02 +0000 (09:51 +0200)
codegen/valagtypemodule.vala

index 273f6a1f2ce5c14d4b74418e3bb235bdb1780a8d..d7621dce976f9e28fb02d122e6867e4ac4ee7472 100644 (file)
@@ -2153,7 +2153,7 @@ public class Vala.GTypeModule : GErrorModule {
                                cexpr = new CCodeBinaryExpression (CCodeBinaryOperator.OR, cnull, ctype_check);
                        }
                        ccheck.add_argument (cexpr);
-               } else if (!non_null) {
+               } else if (!non_null || (t is Struct && ((Struct) t).is_simple_type ())) {
                        return;
                } else if (t == glist_type || t == gslist_type) {
                        // NULL is empty list