git.ucc.asn.au
/
progcomp2012.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed segfault in manager program
[progcomp2012.git]
/
manager
/
game.cpp
diff --git
a/manager/game.cpp
b/manager/game.cpp
index
ce655d7
..
26369d3
100644
(file)
--- a/
manager/game.cpp
+++ b/
manager/game.cpp
@@
-205,6
+205,11
@@
void Game::Wait(double wait)
void Game::HandleBrokenPipe(int sig)
{
void Game::HandleBrokenPipe(int sig)
{
+ if (theGame == NULL)
+ {
+ fprintf(stderr, "ERROR - Recieved SIGPIPE during game exit!\n");
+ exit(EXIT_FAILURE);
+ }
if (theGame->turn == Piece::RED)
{
theGame->logMessage("Game ends on RED's turn - REASON: ");
if (theGame->turn == Piece::RED)
{
theGame->logMessage("Game ends on RED's turn - REASON: ");
UCC
git Repository :: git.ucc.asn.au