diff options
Diffstat (limited to 'embed/downloader-view.c')
-rw-r--r-- | embed/downloader-view.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/embed/downloader-view.c b/embed/downloader-view.c index 4108448d1..f8fe7f94e 100644 --- a/embed/downloader-view.c +++ b/embed/downloader-view.c @@ -616,6 +616,11 @@ downloader_view_add_download (DownloaderView *dv, char *downloading; #endif + /* dv may be unrefed inside update_download_row if the file + * downloaded completely while the user was choosing where to + * put it, so we need to protect it + */ + g_object_ref (dv); g_object_ref (download); gtk_list_store_append (GTK_LIST_STORE (dv->priv->model), @@ -709,6 +714,9 @@ downloader_view_add_download (DownloaderView *dv, #endif dv->priv->source_id = g_timeout_add (100, (GSourceFunc) update_buttons_timeout_cb, dv); + + /* see above */ + g_object_unref (dv); } static void |