From: Jürg Billeter Date: Fri, 9 Apr 2010 07:52:17 +0000 (+0200) Subject: Fix crash on valid recursive struct usage X-Git-Tag: 0.8.1~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab9de71fea749c133c3c64c1a33a6b1dc3f42796;p=thirdparty%2Fvala.git Fix crash on valid recursive struct usage Fixes bug 614417. --- diff --git a/vala/valastruct.vala b/vala/valastruct.vala index 0e5513c49..addd2db09 100644 --- a/vala/valastruct.vala +++ b/vala/valastruct.vala @@ -1,6 +1,6 @@ /* valastruct.vala * - * Copyright (C) 2006-2009 Jürg Billeter + * Copyright (C) 2006-2010 Jürg Billeter * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -739,12 +739,9 @@ public class Vala.Struct : TypeSymbol { bool is_recursive_value_type (DataType type) { var struct_type = type as StructValueType; - if (struct_type != null) { + if (struct_type != null && !struct_type.nullable) { var st = (Struct) struct_type.type_symbol; if (st == this) { - if (type.nullable) { - return false; - } return true; } foreach (Field f in st.fields) {