[gnome-games] [libgames-support] Only call g_thread_init if it hasn't already been called
- From: Tim Horton <hortont src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-games] [libgames-support] Only call g_thread_init if it hasn't already been called
- Date: Thu, 16 Jul 2009 22:28:55 +0000 (UTC)
commit 68c5708a706f86f3b7816faff52b4b85fdb0f6cb
Author: Tim Horton <hortont svn gnome org>
Date: Fri Jun 12 18:55:01 2009 -0400
[libgames-support] Only call g_thread_init if it hasn't already been called
In the case of Seed games, for example, the Seed runtime has already
called g_thread_init before it's possible to call games_runtime_init.
libgames-support/games-runtime.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libgames-support/games-runtime.c b/libgames-support/games-runtime.c
index cb3f7bc..b399d3f 100644
--- a/libgames-support/games-runtime.c
+++ b/libgames-support/games-runtime.c
@@ -350,7 +350,9 @@ games_runtime_init (const char *name)
/* If we're going to use gconf, gnome-vfs, or canberra, we need to
* init threads; and this has to be done before calling any other glib functions.
*/
- g_thread_init (NULL);
+ if(!g_thread_get_initialized()) {
+ g_thread_init (NULL);
+ }
/* May call any glib function after this point */
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]