[glom] Check that GThread is supported before calling Glib::thread_init().
- From: Murray Cumming <murrayc src gnome org>
- To: svn-commits-list gnome org
- Subject: [glom] Check that GThread is supported before calling Glib::thread_init().
- Date: Thu, 23 Jul 2009 12:14:36 +0000 (UTC)
commit b135c67d982ef1f840e4e18af7571dde72a0a6f5
Author: David King <davidk openismus com>
Date: Thu Jul 23 13:40:32 2009 +0200
Check that GThread is supported before calling Glib::thread_init().
* glom/libglom/init.cc: Check that GThread is supported before calling
Glib::thread_init(). This fixes a crash, as otherwise g_thread_init()
can be called twice.
ChangeLog | 8 +++++++-
glom/libglom/init.cc | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index bc981c9..378e52b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,10 @@
-2009-07-22 Johannes Schmid <jschmid openismus com>
+2009-07-23 David King <davidk openismus com>
+
+ * glom/libglom/init.cc: Check that GThread is supported before calling
+ Glib::thread_init(). This fixes a crash, as otherwise g_thread_init()
+ can be called twice.
+
+2009-07-22 Johannes Schmid <jschmid openismus com>
* configure.ac: Fixed typo with libepc
diff --git a/glom/libglom/init.cc b/glom/libglom/init.cc
index f3791ed..902f158 100644
--- a/glom/libglom/init.cc
+++ b/glom/libglom/init.cc
@@ -29,7 +29,7 @@ namespace Glom
void libglom_init()
{
- g_thread_init(NULL); //So we can use GMutex.
+ if (!Glib::thread_supported()) Glib::thread_init(0); //So we can use GMutex.
Gnome::Gda::init();
Gio::init();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]