[vala] Fix crash on valid recursive struct usage



commit 4bc6c433a7e3041ef3bd502c802652a8809e29b0
Author: Jürg Billeter <j bitron ch>
Date:   Fri Apr 9 09:52:17 2010 +0200

    Fix crash on valid recursive struct usage
    
    Fixes bug 614417.

 vala/valastruct.vala |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/vala/valastruct.vala b/vala/valastruct.vala
index 0e5513c..addd2db 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) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]