[epiphany] downloader-view.c: do not overwrite timeout ID
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] downloader-view.c: do not overwrite timeout ID
- Date: Mon, 30 Aug 2010 09:19:53 +0000 (UTC)
commit 3a6ed841d1fbbe93dd99056718e493161f98dd52
Author: Xan Lopez <xan gnome org>
Date: Mon Aug 30 18:18:20 2010 +0900
downloader-view.c: do not overwrite timeout ID
We just use it to update the buttons 100ms later, so having one is
enough. If we overwrite it we might crash down the road when we run
the timeout on a disposed DV.
embed/downloader-view.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/embed/downloader-view.c b/embed/downloader-view.c
index c5ec5c4..e62064a 100644
--- a/embed/downloader-view.c
+++ b/embed/downloader-view.c
@@ -803,7 +803,8 @@ downloader_view_add_download (DownloaderView *dv,
}
#endif
- dv->priv->source_id = g_timeout_add (100, (GSourceFunc) update_buttons_timeout_cb, dv);
+ if (dv->priv->source_id == 0)
+ dv->priv->source_id = g_timeout_add (100, (GSourceFunc) update_buttons_timeout_cb, dv);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]