[maemo-commits] [maemo-commits] r18079 - in projects/haf/trunk/clutter0.8: clutter debian
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Thu Apr 16 13:50:05 EEST 2009
- Previous message: [maemo-commits] r18078 - projects/haf/trunk/clutter0.8/debian
- Next message: [maemo-commits] r18080 - in projects/haf/trunk/posix-locales: . debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: gw Date: 2009-04-16 13:50:04 +0300 (Thu, 16 Apr 2009) New Revision: 18079 Modified: projects/haf/trunk/clutter0.8/clutter/clutter-id-pool.c projects/haf/trunk/clutter0.8/debian/changelog Log: * Modified clutter_id_pool_lookup to not segfault if the ID is not in the pool, and if g_return_if_fail is undefined. Fixes NB#111366 Modified: projects/haf/trunk/clutter0.8/clutter/clutter-id-pool.c =================================================================== --- projects/haf/trunk/clutter0.8/clutter/clutter-id-pool.c 2009-04-16 10:37:16 UTC (rev 18078) +++ projects/haf/trunk/clutter0.8/clutter/clutter-id-pool.c 2009-04-16 10:50:04 UTC (rev 18079) @@ -48,7 +48,7 @@ self = g_slice_new (ClutterIDPool); - self->array = g_array_sized_new (FALSE, FALSE, + self->array = g_array_sized_new (FALSE, FALSE, sizeof (gpointer), initial_size); self->free_ids = NULL; return self; @@ -112,11 +112,11 @@ { gpointer *array; - g_return_val_if_fail (id_pool != NULL, NULL); - g_return_val_if_fail (id_pool->array != NULL, NULL); + if (!id_pool || + !id_pool->array || + id >= id_pool->array->len) + return 0; - g_return_val_if_fail (id < id_pool->array->len, NULL); - array = (void*) id_pool->array->data; return array[id]; Modified: projects/haf/trunk/clutter0.8/debian/changelog =================================================================== --- projects/haf/trunk/clutter0.8/debian/changelog 2009-04-16 10:37:16 UTC (rev 18078) +++ projects/haf/trunk/clutter0.8/debian/changelog 2009-04-16 10:50:04 UTC (rev 18079) @@ -1,6 +1,7 @@ clutter (0.8.2-0maemo28~unreleased) unstable; urgency=low - * writeme + * Modified clutter_id_pool_lookup to not segfault if the ID is not in the + pool, and if g_return_if_fail is undefined. Fixes NB#111366 -- Gordon Williams <gordon.williams at collabora.co.uk> Thu, 16 Apr 2009 13:32:59 +0300
- Previous message: [maemo-commits] r18078 - projects/haf/trunk/clutter0.8/debian
- Next message: [maemo-commits] r18080 - in projects/haf/trunk/posix-locales: . debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]