From 2b2ba9cd6e0cc10d200f6485271dcbeeb8ec217f Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Sun, 4 Nov 2018 19:15:07 +0100 Subject: [PATCH] [dmd-cxx] Backport: Don't pass null pointer as format parameter to errorSupplemental --- src/dmodule.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dmodule.c b/src/dmodule.c index d49945f00efb..d866e3a20b85 100644 --- a/src/dmodule.c +++ b/src/dmodule.c @@ -312,7 +312,8 @@ bool Module::read(Loc loc) { ::error(loc, "cannot find source code for runtime library file 'object.d'"); errorSupplemental(loc, "dmd might not be correctly installed. Run 'dmd -man' for installation instructions."); - errorSupplemental(loc, "config file: %s", FileName::canonicalName(global.inifilename)); + const char *dmdConfFile = FileName::canonicalName(global.inifilename); + errorSupplemental(loc, "config file: %s", dmdConfFile ? dmdConfFile : "not found"); } else {