Fix assertion
authorLars Knoll <lars.knoll@digia.com>
Wed, 12 Dec 2012 21:57:06 +0000 (22:57 +0100)
committerSimon Hausmann <simon.hausmann@digia.com>
Wed, 12 Dec 2012 13:05:54 +0000 (14:05 +0100)
Change-Id: I2c79d7c8c5f8624a5cfd5cb1c5af1488ccd5aada
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
qv4codegen.cpp

index 35e1014..4802786 100644 (file)
@@ -1493,8 +1493,8 @@ void Codegen::linearize(IR::Function *function)
         if (!trace.contains(b)) {
             foreach (IR::BasicBlock *out, b->out) {
                 int idx = out->in.indexOf(b);
-                assert(idx >= 0);
-                out->in.remove(idx);
+                if (idx >= 0)
+                    out->in.remove(idx);
             }
             delete b;
         }