[gcompris] Major random crash fix. In python activity, a call to gcompris.skin.svg_get() was freeing the skin o



commit 81388cf4d16a0d571bb061df503b88f915f3cb54
Author: Bruno Coudoin <bruno coudoin free fr>
Date:   Mon Feb 14 23:23:28 2011 +0100

    Major random crash fix. In python activity, a call to gcompris.skin.svg_get() was freeing the skin object but it should not.
    
    This resulted in random crashes at any point in GCompris when trying to read the skin svg_handle.

 src/boards/py-mod-skin.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/boards/py-mod-skin.c b/src/boards/py-mod-skin.c
index 2dbebfa..18eb6eb 100644
--- a/src/boards/py-mod-skin.c
+++ b/src/boards/py-mod-skin.c
@@ -92,7 +92,7 @@ py_gc_skin_rsvg_get(PyObject* self, PyObject* args)
   /* Create and return the result */
   pyresult = (PyObject*) pygobject_new((GObject*) result);
 
-  g_object_unref(result);
+  // 'result' must not be freed, it is managed by gc_skin_rsvg_get()
 
   return(pyresult);
 }



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