From a7c77785f6200d95bb17ffa3e53244e0fd85b288 Mon Sep 17 00:00:00 2001 From: Andy2 Date: Wed, 7 Jul 2010 06:40:34 -0700 Subject: [PATCH] return false if no move found -- to really fix the crash --- xwords4/common/engine.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xwords4/common/engine.c b/xwords4/common/engine.c index f6b5d1a59..e34e3f0d4 100644 --- a/xwords4/common/engine.c +++ b/xwords4/common/engine.c @@ -513,7 +513,8 @@ engine_findMove( EngineCtxt* engine, const ModelCtxt* model, result = XP_FALSE; } else { PossibleMove* move; - if ( chooseMove( engine, &move ) ) { + result = chooseMove( engine, &move ); + if ( result ) { XP_ASSERT( !!newMove ); XP_MEMCPY( newMove, &move->moveInfo, sizeof(*newMove) ); }