[vala] Fix critical when using general catch clauses



commit 0201aad1c6ab34af0d11fcdc8430180aa5d1100a
Author: Jürg Billeter <j bitron ch>
Date:   Tue Jul 28 23:43:27 2009 +0200

    Fix critical when using general catch clauses

 vala/valatrystatement.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/vala/valatrystatement.vala b/vala/valatrystatement.vala
index 6e209a8..060b2d4 100644
--- a/vala/valatrystatement.vala
+++ b/vala/valatrystatement.vala
@@ -120,7 +120,7 @@ public class Vala.TryStatement : CodeNode, Statement {
 		var handled_error_types = new Gee.ArrayList<DataType> ();
 		foreach (CatchClause clause in catch_clauses) {
 			foreach (DataType body_error_type in error_types) {
-				if (body_error_type.compatible (clause.error_type)) {
+				if (clause.error_type == null || body_error_type.compatible (clause.error_type)) {
 					handled_error_types.add (body_error_type);
 				}
 			}



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