Skip to content

Commit

Permalink
Fixed crash where NWNX_CORE_SKIP=true.
Browse files Browse the repository at this point in the history
  • Loading branch information
Liareth committed Mar 17, 2018
1 parent 7993f69 commit 26a3328
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions Core/NWNXCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,17 +340,18 @@ void NWNXCore::CreateServerHandler(API::CAppManager* app)
if (g_core->m_coreServices->m_config->Get<bool>("SKIP", false))
{
LOG_INFO("Not loading NWNX due to configuration.");
return;
}

try
{
g_core->InitialSetupHooks();
g_core->InitialSetupPlugins();
}
catch (const std::runtime_error& ex)
else
{
LOG_FATAL("The server encountered a fatal error '%s' during setup and must now terminate.", ex.what());
try
{
g_core->InitialSetupHooks();
g_core->InitialSetupPlugins();
}
catch (const std::runtime_error& ex)
{
LOG_FATAL("The server encountered a fatal error '%s' during setup and must now terminate.", ex.what());
}
}

g_core->m_createServerHook.reset();
Expand Down

0 comments on commit 26a3328

Please sign in to comment.