]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Guard target_value to be non-null in visit_expression
authorLuca Bruno <lucabru@src.gnome.org>
Sat, 27 Aug 2011 14:30:45 +0000 (16:30 +0200)
committerLuca Bruno <lucabru@src.gnome.org>
Sat, 27 Aug 2011 14:38:30 +0000 (16:38 +0200)
Fixes bug 657499.

codegen/valaccodebasemodule.vala

index a62c6eae5ab725855ad7bca8b7f78decb21966ca..e9c9a7a44e8940cd6cc8310ebd91ffa649994a1f 100644 (file)
@@ -3476,6 +3476,10 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                                expr.target_value = transform_value (expr.target_value, expr.target_type, expr);
                        }
 
+                       if (expr.target_value == null) {
+                               return;
+                       }
+
                        if (expr.formal_target_type is GenericType && !(expr.target_type is GenericType)) {
                                if (expr.formal_target_type.type_parameter.parent_symbol != garray_type) {
                                        // GArray doesn't use pointer-based generics