[vala] codegen: Guard target_value to be non-null in visit_expression
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] codegen: Guard target_value to be non-null in visit_expression
- Date: Sat, 27 Aug 2011 14:39:27 +0000 (UTC)
commit e76634f952e7d622b71e2001249e9ddc37003fe8
Author: Luca Bruno <lucabru src gnome org>
Date: Sat Aug 27 16:30:45 2011 +0200
codegen: Guard target_value to be non-null in visit_expression
Fixes bug 657499.
codegen/valaccodebasemodule.vala | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index a62c6ea..e9c9a7a 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -3476,6 +3476,10 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
expr.target_value = transform_value (expr.target_value, expr.target_type, expr);
}
+ if (expr.target_value == null) {
+ return;
+ }
+
if (expr.formal_target_type is GenericType && !(expr.target_type is GenericType)) {
if (expr.formal_target_type.type_parameter.parent_symbol != garray_type) {
// GArray doesn't use pointer-based generics
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]