[Orxonox-commit 3972] r8646 - code/branches/presentation/src/libraries/network
rgrieder at orxonox.net
rgrieder at orxonox.net
Sat May 28 19:35:35 CEST 2011
Author: rgrieder
Date: 2011-05-28 19:35:35 +0200 (Sat, 28 May 2011)
New Revision: 8646
Modified:
code/branches/presentation/src/libraries/network/LANDiscovery.cc
Log:
Moved LANDiscovery singleton to Graphics Scope to fix the "host_ == NULL" problem.
Also fixed possible bug in d'tor.
Modified: code/branches/presentation/src/libraries/network/LANDiscovery.cc
===================================================================
--- code/branches/presentation/src/libraries/network/LANDiscovery.cc 2011-05-28 16:56:56 UTC (rev 8645)
+++ code/branches/presentation/src/libraries/network/LANDiscovery.cc 2011-05-28 17:35:35 UTC (rev 8646)
@@ -37,7 +37,7 @@
namespace orxonox
{
- ManageScopedSingleton(LANDiscovery, ScopeID::Root, true);
+ ManageScopedSingleton(LANDiscovery, ScopeID::Graphics, true);
LANDiscovery::LANDiscovery()
{
@@ -48,7 +48,8 @@
LANDiscovery::~LANDiscovery()
{
- enet_host_destroy(this->host_);
+ if (this->host_ != NULL)
+ enet_host_destroy(this->host_);
}
void LANDiscovery::discover()
More information about the Orxonox-commit
mailing list