couple of resource leaks fixes (#2526)

This commit is contained in:
David CARLIER 2016-06-28 00:47:56 +01:00 committed by auriamg
parent 8b52831083
commit a99d02f366
3 changed files with 7 additions and 2 deletions

View File

@ -490,6 +490,7 @@ bool DeviceManager::load()
if(input->getName()!="input")
{
Log::warn("DeviceManager", "Invalid input.xml file - no input node.");
delete input;
return false;
}
@ -500,6 +501,7 @@ bool DeviceManager::load()
GUIEngine::showMessage(_("Please re-configure your key bindings."));
GUIEngine::showMessage(_("Your input config file is not compatible "
"with this version of STK."));
delete input;
return false;
}

View File

@ -191,6 +191,8 @@ Online::XMLRequest* ServersManager::getLANRefreshRequest() const
m_success = true;
} // if received_data
} // while still waiting
delete broadcast;
if (!m_success)
m_info = _("No LAN server detected");
} // operation

View File

@ -46,6 +46,7 @@ NavMesh::NavMesh(const std::string &filename)
if(xml->getName()!="navmesh")
{
Log::error("NavMesh", "NavMesh is invalid. \n");
delete xml;
return;
}