Skip to content

Commit

Permalink
Fix double delete in ProtocolGame::release().
Browse files Browse the repository at this point in the history
Add const to Dispatcher::getDispatcherCycle().
  • Loading branch information
djarek committed Jul 14, 2015
1 parent 78f18b4 commit 4ad0c9a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/protocolgame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ void ProtocolGame::release()
//dispatcher thread
if (player && player->client == shared_from_this()) {
player->client.reset();
g_game.ReleaseCreature(player);
player->decrementReferenceCounter();
player = nullptr;
}
Expand Down
2 changes: 1 addition & 1 deletion src/tasks.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class Dispatcher
void shutdown();
void join();

uint64_t getDispatcherCycle() {
uint64_t getDispatcherCycle() const {
return dispatcherCycle;
}
protected:
Expand Down

0 comments on commit 4ad0c9a

Please sign in to comment.