[gnome-pilot] Fix crash on gpilod startup.
- From: Matthew Charles Davey <mcdavey src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-pilot] Fix crash on gpilod startup.
- Date: Mon, 9 Aug 2010 08:07:49 +0000 (UTC)
commit 7fbb3972708741caf15fcae923cd7128b6b8e536
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]