From 8ab98dad494285fb91b7e679d4f28bd90b6386d2 Mon Sep 17 00:00:00 2001 From: Tomas Lindquist Olsen Date: Mon, 2 Feb 2009 02:35:44 +0100 Subject: [PATCH] Fixed assertion failure when object.d is missing the ModuleInfo class --- gen/toobj.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gen/toobj.cpp b/gen/toobj.cpp index 9662746e..7e590191 100644 --- a/gen/toobj.cpp +++ b/gen/toobj.cpp @@ -616,13 +616,18 @@ void Module::genmoduleinfo() // } // resolve ModuleInfo - assert(moduleinfo); + if (!moduleinfo) + { + error("object.d is missing the ModuleInfo class"); + fatal(); + } + DtoForceConstInitDsymbol(moduleinfo); // check for patch if (moduleinfo->fields.dim != 9) { - error("unpatched object.d detected, ModuleInfo incorrect"); + error("object.d ModuleInfo class is incorrect"); fatal(); }