[gcompris] minor: no more crash if gnuchess is not found.
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcompris] minor: no more crash if gnuchess is not found.
- Date: Thu, 17 May 2012 18:26:01 +0000 (UTC)
commit 65688d5dc096fee65bf311e8f5bcf6a703733b7f
Author: Bruno Coudoin <bruno coudoin free fr>
Date: Thu May 17 20:25:33 2012 +0200
minor: no more crash if gnuchess is not found.
src/chess_computer-activity/chess.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/chess_computer-activity/chess.c b/src/chess_computer-activity/chess.c
index 7a3e4fa..07b3bf1 100644
--- a/src/chess_computer-activity/chess.c
+++ b/src/chess_computer-activity/chess.c
@@ -352,7 +352,8 @@ static void end_board ()
info_item = NULL;
- engine_local_destroy(gnuchess_pid);
+ if ( gnuchess_pid )
+ engine_local_destroy(gnuchess_pid);
}
/* ======================================= */
@@ -1065,7 +1066,7 @@ static void
engine_local_destroy (GPid gnuchess_pid)
{
- g_warning("engine_local_destroy () \n");
+ g_warning("engine_local_destroy (%d) \n", gnuchess_pid);
write_child (write_chan, "quit\n");
g_source_remove(read_cb);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]