From 4d9d6d7148c8ff271d67196874c15d4b7ccef869 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Sun, 28 Aug 2011 14:51:25 +0200
Subject: Call g_type_init before using gconf.

Resolves: #957

diff --git a/Swiften/Network/GConfProxyProvider.cpp b/Swiften/Network/GConfProxyProvider.cpp
index 26de4d8..8d97c68 100644
--- a/Swiften/Network/GConfProxyProvider.cpp
+++ b/Swiften/Network/GConfProxyProvider.cpp
@@ -16,6 +16,13 @@
 namespace Swift {
 
 GConfProxyProvider::GConfProxyProvider() {
+	// Ensure static GLib initialization methods are called
+	static bool glibInitialized = false;
+	if (!glibInitialized) {
+		g_type_init();
+		glibInitialized = true;
+	}
+
 	socksProxy = getFromGConf("/system/proxy/socks_host", "/system/proxy/socks_port");
 	httpProxy = getFromGConf("/system/http_proxy/host", "/system/http_proxy/port");
 	SWIFT_LOG(debug) << "GConf: SOCKS5 => " << socksProxy.toString() << "; HTTP Connect => " << httpProxy.toString() << std::endl;
-- 
cgit v0.10.2-6-g49f6