[devhelp: 15/36] book: ensure a book reference in the timeout
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp: 15/36] book: ensure a book reference in the timeout
- Date: Mon, 20 Dec 2010 14:32:41 +0000 (UTC)
commit ff7688b30848cab4aaf446ccbffae06a3bc8f635
Author: Aleksander Morgado <aleksander lanedo com>
Date: Thu Dec 2 23:52:23 2010 +0100
book: ensure a book reference in the timeout
src/dh-book.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/dh-book.c b/src/dh-book.c
index 70b3ba8..6457628 100644
--- a/src/dh-book.c
+++ b/src/dh-book.c
@@ -284,6 +284,8 @@ book_monitor_event_timeout_cb (gpointer data)
/* Reset event */
priv->monitor_event = BOOK_MONITOR_EVENT_NONE;
+ /* Destroy the reference we got in the timeout */
+ g_object_unref (book);
return FALSE;
}
@@ -324,7 +326,7 @@ book_monitor_event_cb (GFileMonitor *file_monitor,
}
priv->monitor_event_timeout_id = g_timeout_add_seconds (EVENT_MERGE_TIMEOUT_SECS,
book_monitor_event_timeout_cb,
- book);
+ g_object_ref (book));
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]