[gcompris] shapegame: fixed a random crash in shapegame activities that happened while dragging a piece.
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcompris] shapegame: fixed a random crash in shapegame activities that happened while dragging a piece.
- Date: Thu, 29 Dec 2011 20:27:57 +0000 (UTC)
commit f501baef3f8f1862671a6c2e57c680ebc7034fdb
Author: Bruno Coudoin <bruno coudoin free fr>
Date: Thu Dec 29 17:47:08 2011 +0100
shapegame: fixed a random crash in shapegame activities that happened while dragging a piece.
src/babymatch-activity/shapegame.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/babymatch-activity/shapegame.c b/src/babymatch-activity/shapegame.c
index 4b34f71..a30c282 100644
--- a/src/babymatch-activity/shapegame.c
+++ b/src/babymatch-activity/shapegame.c
@@ -945,7 +945,7 @@ item_event_drag(GooCanvasItem *item,
double item_x, item_y;
Shape *found_shape;
- if(board_paused)
+ if(board_paused || shape == NULL)
return FALSE;
switch(event->type)
@@ -1131,7 +1131,8 @@ item_event(GooCanvasItem *item, GooCanvasItem *target,
if(!gcomprisBoard || board_paused)
return FALSE;
- g_assert(shape);
+ if (shape == NULL )
+ return FALSE;
switch (event->type)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]