[vala] codegen: Don't try to create a GClosure for null
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] codegen: Don't try to create a GClosure for null
- Date: Sat, 16 Oct 2010 07:58:17 +0000 (UTC)
commit 341808e8f62ca78aab856dc01a0c51669883742f
Author: Evan Nemerson <evan coeus-group com>
Date: Sat Oct 16 09:57:35 2010 +0200
codegen: Don't try to create a GClosure for null
Fixes bug 631269.
codegen/valaccodemethodcallmodule.vala | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valaccodemethodcallmodule.vala b/codegen/valaccodemethodcallmodule.vala
index cceec70..2aeca59 100644
--- a/codegen/valaccodemethodcallmodule.vala
+++ b/codegen/valaccodemethodcallmodule.vala
@@ -364,7 +364,7 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
closure_new.add_argument (new CCodeCastExpression (cexpr, "GCallback"));
closure_new.add_argument (delegate_target);
closure_new.add_argument (delegate_target_destroy_notify);
- cexpr = closure_new;
+ cexpr = new CCodeConditionalExpression (new CCodeBinaryExpression (CCodeBinaryOperator.EQUALITY, cexpr, new CCodeIdentifier ("NULL")), new CCodeIdentifier ("NULL"), closure_new);
} else {
carg_map.set (get_param_pos (param.cdelegate_target_parameter_position), delegate_target);
if (deleg_type.value_owned) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]