vala r2155 - in trunk: . gobject
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r2155 - in trunk: . gobject
- Date: Mon, 15 Dec 2008 09:01:35 +0000 (UTC)
Author: juergbi
Date: Mon Dec 15 09:01:34 2008
New Revision: 2155
URL: http://svn.gnome.org/viewvc/vala?rev=2155&view=rev
Log:
2008-12-15 JÃrg Billeter <j bitron ch>
* gobject/valaccodestructmodule.vala:
Fix bug introduced in last commit
Modified:
trunk/ChangeLog
trunk/gobject/valaccodestructmodule.vala
Modified: trunk/gobject/valaccodestructmodule.vala
==============================================================================
--- trunk/gobject/valaccodestructmodule.vala (original)
+++ trunk/gobject/valaccodestructmodule.vala Mon Dec 15 09:01:34 2008
@@ -183,10 +183,12 @@
cblock.add_statement (new CCodeExpressionStatement (new CCodeAssignment (dest, copy)));
var array_type = f.field_type as ArrayType;
- for (int dim = 1; dim <= array_type.rank; dim++) {
- var len_src = new CCodeMemberAccess.pointer (new CCodeIdentifier ("self"), get_array_length_cname (f.name, dim));
- var len_dest = new CCodeMemberAccess.pointer (new CCodeIdentifier ("dest"), get_array_length_cname (f.name, dim));
- cblock.add_statement (new CCodeExpressionStatement (new CCodeAssignment (len_dest, len_src)));
+ if (array_type != null) {
+ for (int dim = 1; dim <= array_type.rank; dim++) {
+ var len_src = new CCodeMemberAccess.pointer (new CCodeIdentifier ("self"), get_array_length_cname (f.name, dim));
+ var len_dest = new CCodeMemberAccess.pointer (new CCodeIdentifier ("dest"), get_array_length_cname (f.name, dim));
+ cblock.add_statement (new CCodeExpressionStatement (new CCodeAssignment (len_dest, len_src)));
+ }
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]