[gnome-games/gnome-2-26] Fix assertion failure on hildon
- From: Christian Persch <chpe src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-games/gnome-2-26] Fix assertion failure on hildon
- Date: Fri, 12 Jun 2009 10:23:14 -0400 (EDT)
commit 0f57490bf6345348e48779c835b5d6e1aea5db28
Author: Christian Persch <chpe gnome org>
Date: Tue Jun 2 00:29:37 2009 +0200
Fix assertion failure on hildon
g_parse_debug_string is only NULL-safe since glib 2.16 for bug #503862.
libgames-support/games-debug.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/libgames-support/games-debug.c b/libgames-support/games-debug.c
index c640b31..1cc2b8c 100644
--- a/libgames-support/games-debug.c
+++ b/libgames-support/games-debug.c
@@ -37,9 +37,16 @@ _games_debug_init (void)
{ "sound ", GAMES_DEBUG_SOUND },
{ "window-state", GAMES_DEBUG_WINDOW_STATE }
};
+ const char *env;
- _games_debug_flags = g_parse_debug_string (g_getenv ("GAMES_DEBUG"),
- keys, G_N_ELEMENTS (keys));
+ env = g_getenv ("GAMES_DEBUG");
+
+#if !GLIB_CHECK_VERSION (2, 16, 0)
+ /* g_parse_debug_string is only NULL-safe since 2.16 */
+ if (env == NULL)
+ return;
+#endif
+
+ _games_debug_flags = g_parse_debug_string (env, keys, G_N_ELEMENTS (keys));
#endif /* GNOME_ENABLE_DEBUG */
}
-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]