[gcompris] shapegame: fixed a potential crash when a piece was overwritten by another in their wrong position.
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcompris] shapegame: fixed a potential crash when a piece was overwritten by another in their wrong position.
- Date: Thu, 14 Jul 2011 06:16:35 +0000 (UTC)
commit 0f7d315269b738251aa4372d3e4716ee417bf830
Author: Bruno Coudoin <bruno coudoin free fr>
Date: Thu Jul 14 08:15:32 2011 +0200
shapegame: fixed a potential crash when a piece was overwritten by another in their wrong position.
src/babymatch-activity/shapegame.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/babymatch-activity/shapegame.c b/src/babymatch-activity/shapegame.c
index 2aeb887..c386579 100644
--- a/src/babymatch-activity/shapegame.c
+++ b/src/babymatch-activity/shapegame.c
@@ -939,11 +939,12 @@ item_event_drag(GooCanvasItem *item,
{
case SHAPE_TARGET:
/* unplace this shape */
- if (shape->placed && shape->placed->target_point)
+ if (shape->placed && shape->placed->target_point) {
g_object_set (shape->placed->target_point, "visibility",
GOO_CANVAS_ITEM_VISIBLE, NULL);
- shape->placed->shape_place = NULL;
- shape->placed = NULL;
+ shape->placed->shape_place = NULL;
+ shape->placed = NULL;
+ }
/* No break on purpose */
case SHAPE_ICON:
gc_drag_offset_save(event);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]