From 935dac7ae67c1a254cbe6e1c36a0b2d5a00e1457 Mon Sep 17 00:00:00 2001 From: Eric Frias Date: Wed, 16 Nov 2016 15:57:11 -0500 Subject: [PATCH] Fix crash in logging when one player fails to reveal their move --- libraries/chain/game_object.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/chain/game_object.cpp b/libraries/chain/game_object.cpp index bc205f20..2bbcdd92 100644 --- a/libraries/chain/game_object.cpp +++ b/libraries/chain/game_object.cpp @@ -470,7 +470,8 @@ namespace graphene { namespace chain { { // we now know who played what, figure out if we have a winner const rock_paper_scissors_game_details& rps_game_details = game_details.get(); - if (rps_game_details.reveal_moves[0]->gesture == rps_game_details.reveal_moves[1]->gesture) + if (rps_game_details.reveal_moves[0] && rps_game_details.reveal_moves[1] && + rps_game_details.reveal_moves[0]->gesture == rps_game_details.reveal_moves[1]->gesture) ilog("The game was a tie, both players threw ${gesture}", ("gesture", rps_game_details.reveal_moves[0]->gesture)); else {