[Telepathy-commits] [telepathy-gabble/master] GabbleJingleContent: destroy timeout timer before content is disposed
Senko Rasic
senko at phyrexia.lan
Tue Dec 2 04:34:06 PST 2008
---
src/jingle-content.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/jingle-content.c b/src/jingle-content.c
index 9c2fcea..7f58ae6 100644
--- a/src/jingle-content.c
+++ b/src/jingle-content.c
@@ -914,6 +914,12 @@ gabble_jingle_content_remove (GabbleJingleContent *c, gboolean signal_peer)
DEBUG ("called for content %s", priv->name);
+ if (priv->timer_id != 0)
+ {
+ g_source_remove (priv->timer_id);
+ priv->timer_id = 0;
+ }
+
if (priv->state == JINGLE_CONTENT_STATE_REMOVING)
{
DEBUG ("ignoring request to remove content which is already being removed");
@@ -939,10 +945,7 @@ gabble_jingle_content_remove (GabbleJingleContent *c, gboolean signal_peer)
g_signal_emit (c, signals[REMOVED], 0);
}
- if (priv->timer_id != 0)
- {
- g_source_remove (priv->timer_id);
- priv->timer_id = 0;
- }
+ /* At this point content could be unreffed by REMOVED handler
+ * and disposed of; don't do anything else with it. */
}
--
1.5.6.5
More information about the Telepathy-commits
mailing list