[gcompris] math table revision activity, fixed a crash case



commit 27f8eec00fbf83e2c13482af0f311e060539de8c
Author: Bruno Coudoin <bcoudoin gcompris net>
Date:   Mon Sep 30 23:05:29 2013 +0200

    math table revision activity, fixed a crash case
    
    When the activity starts, if the enter key is pressed
    instead of the 'i am ready' button GCompris was crashing.
    
    Thanks to José Jorge for reporting this bug.

 src/algebra_by-activity/algebra.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/algebra_by-activity/algebra.c b/src/algebra_by-activity/algebra.c
index f42ea94..f70fc37 100644
--- a/src/algebra_by-activity/algebra.c
+++ b/src/algebra_by-activity/algebra.c
@@ -734,6 +734,9 @@ static void process_ok()
   ToBeFoundItem *toBeFoundItem;
   ToBeFoundItem *hasfail=NULL;
 
+  if(!currentToBeFoundItem)
+    return;
+
   set_focus_item(currentToBeFoundItem, FALSE);
   /* Go to the leftmost digit */
   while(currentToBeFoundItem->previous!=NULL)


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