From cbcc12da4255404b545afdc6f6334c9b3aecf6ba Mon Sep 17 00:00:00 2001 From: floty Date: Sat, 7 Jan 2012 20:46:30 +0000 Subject: [PATCH] bugfix: program crash by logging in network games --- src/engine/local_engine/localhand.cpp | 4 ++-- src/engine/local_engine/localhand.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/engine/local_engine/localhand.cpp b/src/engine/local_engine/localhand.cpp index d25b07fd..c59da6d9 100755 --- a/src/engine/local_engine/localhand.cpp +++ b/src/engine/local_engine/localhand.cpp @@ -569,7 +569,7 @@ void LocalHand::switchRounds() myGui->refreshPot(); myGui->refreshSet(); currentRound = GAME_STATE_POST_RIVER; - myLog->setCurrentRound(currentRound); + if(myLog) myLog->setCurrentRound(currentRound); } // check for all in condition @@ -636,7 +636,7 @@ void LocalHand::switchRounds() if (currentRound < GAME_STATE_POST_RIVER) { // do not increment past 4 currentRound = GameState(currentRound + 1); - myLog->setCurrentRound(currentRound); + if(myLog) myLog->setCurrentRound(currentRound); } //log board cards for allin diff --git a/src/engine/local_engine/localhand.h b/src/engine/local_engine/localhand.h index 0a2f91ad..ea6ea13a 100755 --- a/src/engine/local_engine/localhand.h +++ b/src/engine/local_engine/localhand.h @@ -90,7 +90,7 @@ public: void setCurrentRound(GameState theValue) { currentRound = theValue; - myLog->setCurrentRound(currentRound); + if(myLog) myLog->setCurrentRound(currentRound); } GameState getCurrentRound() const { return currentRound;