shithub: mc

Download patch

ref: c4b6a1c57ece9e02c05f046f4dd472f6d8c6ec6b
parent: d45d6cb5b1db467f990332c88492e57f687fa316
author: Ori Bernstein <[email protected]>
date: Tue Apr 2 08:51:53 EDT 2013

Error out on failing to respolve namespaces.

    Don't segfault.

--- a/parse/infer.c
+++ b/parse/infer.c
@@ -262,6 +262,8 @@
             if (t->name->name.ns) {
                 ns = getns_str(ns, t->name->name.ns);
             }
+            if (!ns)
+                fatal(t->name->line, "Could not resolve namespace \"%s\"", t->name->name.ns);
             if (!(lu = gettype(ns, t->name)))
                 fatal(t->name->line, "Could not resolve type %s", namestr(t->name));
             tytab[t->tid] = lu;