From: Jürg Billeter Date: Tue, 28 Jul 2009 21:43:27 +0000 (+0200) Subject: Fix critical when using general catch clauses X-Git-Tag: 0.7.5~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0201aad1c6ab34af0d11fcdc8430180aa5d1100a;p=thirdparty%2Fvala.git Fix critical when using general catch clauses --- diff --git a/vala/valatrystatement.vala b/vala/valatrystatement.vala index 6e209a876..060b2d4bc 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 (); 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); } }