[gcompris/GCOMPRIS_8_3] Avoided a warning in calling gnome_canvas_point_free on a NULL item.



commit c246ae6889db3f7e53332868bdfaad2b0976a132
Author: Bruno Coudoin <bruno coudoin free fr>
Date:   Sun Jul 5 10:11:27 2009 +0200

    Avoided a warning in calling gnome_canvas_point_free on a NULL item.

 src/boards/crane.c |    5 +++--
 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));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]