[rhythmbox] podcast: don't free download info until we're actually done with it



commit 17068f5fd31991180cd35665aa5528f61d911341
Author: Jonathan Matthew <jonathan d14n org>
Date:   Wed Sep 9 08:19:20 2020 +1000

    podcast: don't free download info until we're actually done with it

 podcast/rb-podcast-manager.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/podcast/rb-podcast-manager.c b/podcast/rb-podcast-manager.c
index 15f203e32..7e77bec6f 100644
--- a/podcast/rb-podcast-manager.c
+++ b/podcast/rb-podcast-manager.c
@@ -1737,8 +1737,6 @@ podcast_download_cb (GObject *source_object, GAsyncResult *res, gpointer data)
        g_assert (pd->priv->active_download == download);
        pd->priv->active_download = NULL;
 
-       download_info_free (download);
-
        g_task_propagate_boolean (task, &error);
        if (error) {
                if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED) == FALSE) {
@@ -1766,6 +1764,8 @@ podcast_download_cb (GObject *source_object, GAsyncResult *res, gpointer data)
 
        g_signal_emit (pd, rb_podcast_manager_signals[FINISH_DOWNLOAD], 0, download->entry);
 
+       download_info_free (download);
+
        g_object_unref (task);
        rb_podcast_manager_next_file (pd);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]