SHA256
1
0
forked from pool/pidgin
pidgin/pidgin-crash-missing-gst-registry.patch
Stephan Kulow 64de2dbed0 Accepting request 236560 from GNOME:Apps
- Fix crash when GST registry cache file is missing
  + add pidgin-crash-missing-gst-registry.patch according to the 
    GST doc, "gst_init" should be called before any other calls. 
    See (bnc#866455). See (pidgin.im#16224) for the upstream bug
    report.

OBS-URL: https://build.opensuse.org/request/show/236560
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pidgin?expand=0&rev=102
2014-06-18 05:50:28 +00:00

30 lines
751 B
Diff

diff --git a/pidgin/gtkmain.c b/pidgin/gtkmain.c
index 6e828fc..e690d58 100644
--- a/pidgin/gtkmain.c
+++ b/pidgin/gtkmain.c
@@ -75,7 +75,7 @@
#endif
#include <getopt.h>
-
+#include <gst/gst.h>
#ifdef HAVE_SIGNAL_H
@@ -523,7 +523,15 @@ int main(int argc, char *argv[])
#endif
/* Initialize GThread before calling any Glib or GTK+ functions. */
+#if !GLIB_CHECK_VERSION(2, 32, 0)
+ /* GLib threading system is automaticaly initialized since 2.32.
+ * For earlier versions, it have to be initialized before calling any
+ * Glib or GTK+ functions.
+ */
g_thread_init(NULL);
+#endif
+ /* make sure Gst is initialized before any other Glib/Gst calls (see Gst docs) */
+ gst_init(NULL, NULL);
g_set_prgname("Pidgin");