]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Fix critical on unsupported struct field
authorJürg Billeter <j@bitron.ch>
Wed, 6 Oct 2010 18:22:16 +0000 (20:22 +0200)
committerJürg Billeter <j@bitron.ch>
Fri, 8 Oct 2010 21:05:42 +0000 (23:05 +0200)
codegen/valaccodestructmodule.vala

index 84697a5630052af924942415e93a16172dd37392..4630f39d1c7dc36ab79c0aa73a8d46d3ea1eb2af 100644 (file)
@@ -263,6 +263,10 @@ public class Vala.CCodeStructModule : CCodeBaseModule {
                                        var ma = new MemberAccess (this_access, f.name);
                                        ma.symbol_reference = f;
                                        copy = get_ref_cexpression (f.variable_type, copy, ma, f);
+                                       if (copy == null) {
+                                               // error case, continue to avoid critical
+                                               continue;
+                                       }
                                }
                                var dest = new CCodeMemberAccess.pointer (new CCodeIdentifier ("dest"), f.name);