[ekiga/ds-fix-boost-leaks] RosterViewGtk: Fixed potential crash on exit due to timeout.
- From: Damien Sandras <dsandras src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga/ds-fix-boost-leaks] RosterViewGtk: Fixed potential crash on exit due to timeout.
- Date: Sun, 4 Oct 2015 11:50:10 +0000 (UTC)
commit a4f53a8f452d70c6ab7ee568526c643bae41419b
Author: Damien Sandras <dsandras seconix com>
Date: Sun Oct 4 13:33:27 2015 +0200
RosterViewGtk: Fixed potential crash on exit due to timeout.
The pulse timeout has to be stopped when the object is disposed.
lib/engine/gui/gtk-frontend/roster-view-gtk.cpp | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp b/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
index ea3f101..705f58d 100644
--- a/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
+++ b/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
@@ -1526,6 +1526,21 @@ roster_view_gtk_update_account (RosterViewGtk *self,
* GObject stuff
*/
static void
+roster_view_gtk_dispose (GObject *obj)
+{
+ RosterViewGtk *view = NULL;
+
+ view = (RosterViewGtk *)obj;
+
+ if (view->priv->pulse_timeout_id > -1)
+ g_source_remove (view->priv->pulse_timeout_id);
+ view->priv->pulse_timeout_id = -1;
+
+ G_OBJECT_CLASS (roster_view_gtk_parent_class)->dispose (obj);
+}
+
+
+static void
roster_view_gtk_finalize (GObject *obj)
{
RosterViewGtk *view = NULL;
@@ -1539,6 +1554,7 @@ roster_view_gtk_finalize (GObject *obj)
view->priv->folded_groups = NULL;
delete view->priv;
+
G_OBJECT_CLASS (roster_view_gtk_parent_class)->finalize (obj);
}
@@ -1720,6 +1736,7 @@ roster_view_gtk_class_init (RosterViewGtkClass* klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ gobject_class->dispose = roster_view_gtk_dispose;
gobject_class->finalize = roster_view_gtk_finalize;
signals[ACTIONS_CHANGED_SIGNAL] =
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]