From 24a738139056552a6e2aef49f3fd7a5f347e1252 Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 12 Feb 2016 16:04:55 +0100 Subject: [PATCH] Fixed: Display an error if unable to find database.cfg --- code/nel/tools/3d/mesh_utils/mesh_utils.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/nel/tools/3d/mesh_utils/mesh_utils.cpp b/code/nel/tools/3d/mesh_utils/mesh_utils.cpp index 2ea3800a7..b8d70660e 100644 --- a/code/nel/tools/3d/mesh_utils/mesh_utils.cpp +++ b/code/nel/tools/3d/mesh_utils/mesh_utils.cpp @@ -292,7 +292,12 @@ int exportScene(const CMeshUtilsSettings &settings) context.ToolLogger.writeDepend(NLMISC::BUILD, "*", NLMISC::CPath::standardizePath(context.Settings.SourceFilePath, false).c_str()); // Base input file // Apply database configuration - CDatabaseConfig::init(settings.SourceFilePath); + if (!CDatabaseConfig::init(settings.SourceFilePath)) + { + tlerror(context.ToolLogger, context.Settings.SourceFilePath.c_str(), "Unable to find database.cfg in input path or any of its parents."); + return EXIT_FAILURE; + } + CDatabaseConfig::initTextureSearchDirectories(); Assimp::Importer importer;