Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Coudoin <bruno.coudoin@free.fr>2009-07-05 08:11:27 (GMT)
committer Bruno Coudoin <bruno.coudoin@free.fr>2009-07-05 08:11:27 (GMT)
commitc246ae6889db3f7e53332868bdfaad2b0976a132 (patch)
tree4b3f2e77e64bade6aa027027fe481417d68b7844
parentdc4f522a1b1faacd0a825409054647feaaef0ae4 (diff)
Avoided a warning in calling gnome_canvas_point_free on a NULL item.
-rw-r--r--src/boards/crane.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/boards/crane.c b/src/boards/crane.c
index 520471b..bed9806 100644
--- a/src/boards/crane.c
+++ b/src/boards/crane.c
@@ -108,7 +108,7 @@ static gboolean moving = FALSE;
static move_object my_move;
static int list_answer[CRANE_FRAME_LINE * CRANE_FRAME_COLUMN];
static int list_game[CRANE_FRAME_LINE * CRANE_FRAME_COLUMN];
-static GnomeCanvasPoints *crane_rope;
+static GnomeCanvasPoints *crane_rope = NULL;
// gcompris functions
static void start_board (GcomprisBoard *agcomprisBoard);
@@ -277,7 +277,8 @@ static void crane_destroy_all_items()
timer_id = 0;
}
- gnome_canvas_points_free(crane_rope);
+ if (crane_rope)
+ gnome_canvas_points_free(crane_rope);
if(boardRootItem != NULL)
gtk_object_destroy (GTK_OBJECT(boardRootItem));