Skip to content

Commit

Permalink
Fixed|ServerApp: Managing World audiences at shutdown (ShellUsers)
Browse files Browse the repository at this point in the history
ShellUsers was trying to remove its World observer after World had
already been destroyed.
  • Loading branch information
skyjake committed Jul 23, 2013
1 parent d79d8ad commit 16ded53
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 5 additions & 0 deletions doomsday/server/src/serversystem.cpp
Expand Up @@ -89,6 +89,9 @@ DENG2_PIMPL(ServerSystem)

// Update the beacon with the new port.
beacon.start(port);

App_World().audienceForMapChange += shellUsers;

return true;
}

Expand All @@ -104,6 +107,8 @@ DENG2_PIMPL(ServerSystem)

void deinit()
{
App_World().audienceForMapChange -= shellUsers;

beacon.stop();

// Close the listening socket.
Expand Down
4 changes: 0 additions & 4 deletions doomsday/server/src/shellusers.cpp
Expand Up @@ -42,8 +42,6 @@ DENG2_PIMPL_NOREF(ShellUsers)

ShellUsers::ShellUsers() : d(new Instance)
{
App_World().audienceForMapChange += this;

// Player information is sent periodically to all shell users.
connect(d->infoTimer, SIGNAL(timeout()), this, SLOT(sendPlayerInfoToAll()));
d->infoTimer->start();
Expand All @@ -53,8 +51,6 @@ ShellUsers::~ShellUsers()
{
d->infoTimer->stop();

App_World().audienceForMapChange -= this;

foreach(ShellUser *user, d->users)
{
delete user;
Expand Down

0 comments on commit 16ded53

Please sign in to comment.