[vala/0.8] Fix crash on valid recursive struct usage
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.8] Fix crash on valid recursive struct usage
- Date: Wed, 21 Apr 2010 13:13:39 +0000 (UTC)
commit ab9de71fea749c133c3c64c1a33a6b1dc3f42796
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]