[gnome-pilot/dbus] Fix crash on gpilod startup.



commit 970d80b623820b1886182eac0e7df90701851f5f
Author: Halton Huo <halton huo sun com>
Date:   Mon Mar 8 17:07:46 2010 +0800

    Fix crash on gpilod startup.

 gpilotd/gpilot-daemon.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gpilotd/gpilot-daemon.c b/gpilotd/gpilot-daemon.c
index 1b98f96..4619ba6 100644
--- a/gpilotd/gpilot-daemon.c
+++ b/gpilotd/gpilot-daemon.c
@@ -59,6 +59,8 @@
 #include <libhal.h>
 #endif
 
+#define GPILOT_DAEMON_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GPILOT_TYPE_DAEMON, GpilotDaemonPrivate))
+
 #define DEBUG_CODE
 
 static void     gpilot_daemon_class_init  (GpilotDaemonClass *klass);
@@ -2978,11 +2980,15 @@ gpilot_daemon_class_init (GpilotDaemonClass *klass)
                                             G_TYPE_NONE,
                                             1,
                                             G_TYPE_BOOLEAN);
+
+        g_type_class_add_private (klass, sizeof (GpilotDaemonPrivate));
 }
 
 static void
 gpilot_daemon_init (GpilotDaemon *daemon)
 {
+        daemon->priv = GPILOT_DAEMON_GET_PRIVATE (daemon);
+
         daemon->priv->monitors = g_hash_table_new (g_str_hash, g_str_equal);
         daemon->priv->notifications = g_hash_table_new (g_str_hash, g_str_equal);
         daemon->priv->gpilotd_context = gpilot_context_new ();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]