]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Fix critical when using general catch clauses
authorJürg Billeter <j@bitron.ch>
Tue, 28 Jul 2009 21:43:27 +0000 (23:43 +0200)
committerJürg Billeter <j@bitron.ch>
Tue, 28 Jul 2009 21:43:27 +0000 (23:43 +0200)
vala/valatrystatement.vala

index 6e209a8762ea202303308ce3949a62dd4467b2f7..060b2d4bc246c4b0330926b29028c84135bb7158 100644 (file)
@@ -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);
                                }
                        }