From 43574b89d00b319eb7d7602e92a9b482ae33d760 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Orsini Date: Sun, 3 Aug 2014 16:48:40 +0200 Subject: [PATCH] Fixed psensor does not start: Attempt to unlock mutex that was not locked during startup with glib 2.41.2. (LP: #1346299). --- NEWS | 2 ++ src/main.c | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/NEWS b/NEWS index 1feb9c4..4d8b00e 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,8 @@ v1.1.1 * added menu separator for the application indicator menu between sensor items and preferences. * fixed check of sensors/error.h. +* fixed psensor does not start: Attempt to unlock mutex that was not + locked during startup with glib 2.41.2. (LP: #1346299). v1.0.3 ------ diff --git a/src/main.c b/src/main.c index 91fff89..6ac4846 100644 --- a/src/main.c +++ b/src/main.c @@ -551,7 +551,16 @@ int main(int argc, char **argv) g_thread_init(NULL); #endif +#ifdef HAVE_APPINDICATOR_029 + /* gdk_thread_enter/leave only used to workaround mutex bug + * of appindicator < 0.2.9, so do not call gdk_threads_init + * if useless. Calling this function leads to + * crash "Attempt to unlock mutex that was not locked" with + * GLib 2.41.2 (new checking) probably due to bugs in GTK + * itself. + */ gdk_threads_init(); +#endif gtk_init(NULL, NULL); -- 2.7.4