[vala] codegen: Fix critical on unsupported struct field
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] codegen: Fix critical on unsupported struct field
- Date: Wed, 6 Oct 2010 18:22:52 +0000 (UTC)
commit c3cd6a07a55fd50cf4cce8302c3c76ab56acc42c
Author: Jürg Billeter <j bitron ch>
Date: Wed Oct 6 20:22:16 2010 +0200
codegen: Fix critical on unsupported struct field
codegen/valaccodestructmodule.vala | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valaccodestructmodule.vala b/codegen/valaccodestructmodule.vala
index 5a8dc77..424ab72 100644
--- a/codegen/valaccodestructmodule.vala
+++ b/codegen/valaccodestructmodule.vala
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]