[vala] codegen: Fix accessing variables without delegate target



commit b79c04cffaadb52eea080f9d97034926595b84f9
Author: Luca Bruno <lucabru src gnome org>
Date:   Wed May 11 11:43:23 2011 +0200

    codegen: Fix accessing variables without delegate target

 codegen/valaccodememberaccessmodule.vala |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/codegen/valaccodememberaccessmodule.vala b/codegen/valaccodememberaccessmodule.vala
index 38cb88d..1bb8202 100644
--- a/codegen/valaccodememberaccessmodule.vala
+++ b/codegen/valaccodememberaccessmodule.vala
@@ -684,8 +684,8 @@ public abstract class Vala.CCodeMemberAccessModule : CCodeControlFlowModule {
 					result.array_length_cvalues[dim - 1] = new CCodeCastExpression (result.array_length_cvalues[dim - 1], "gint");
 				}
 			}
-		} else if (delegate_type != null && delegate_type.delegate_symbol.has_target) {
-			if (variable.no_delegate_target) {
+		} else if (delegate_type != null) {
+			if (!delegate_type.delegate_symbol.has_target || variable.no_delegate_target) {
 				result.delegate_target_cvalue = new CCodeConstant ("NULL");
 			}
 



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