From 4bc6c433a7e3041ef3bd502c802652a8809e29b0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrg=20Billeter?= Date: Fri, 9 Apr 2010 09:52:17 +0200 Subject: [PATCH] Fix crash on valid recursive struct usage Fixes bug 614417. --- vala/valastruct.vala | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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) { -- 2.47.3