couple of resource leaks fixes (#2526)
This commit is contained in:
parent
8b52831083
commit
a99d02f366
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -46,6 +46,7 @@ NavMesh::NavMesh(const std::string &filename)
|
||||
if(xml->getName()!="navmesh")
|
||||
{
|
||||
Log::error("NavMesh", "NavMesh is invalid. \n");
|
||||
delete xml;
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user