[balsa] Avoid possible repeated dynamic cast



commit 81fa0cd7907ce0200ef76f4e58c45f7eacfdd948
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Mon Dec 11 20:37:47 2017 -0500

    Avoid possible repeated dynamic cast
    
        * src/main-window.c (balsa_window_setup_progress): cast the
        result of g_object_ref() instead of its argument.

 ChangeLog         |    7 +++++++
 src/main-window.c |    2 +-
 2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 93453df..9f42986 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2017-12-11  Peter Bloomfield  <pbloomfield bellsouth net>
+
+       Avoid possible repeated dynamic cast
+
+       * src/main-window.c (balsa_window_setup_progress): cast the
+       result of g_object_ref() instead of its argument.
+
 2017-12-10  Peter Bloomfield  <pbloomfield bellsouth net>
 
        Revise configuration of enchant spell-checking lib
diff --git a/src/main-window.c b/src/main-window.c
index dee75ff..a935b75 100644
--- a/src/main-window.c
+++ b/src/main-window.c
@@ -4724,7 +4724,7 @@ balsa_window_setup_progress(BalsaWindow * window, const gchar * text)
     /* Update the display in an idle callback, in case we were called in
      * a sub-thread.*/
     info = g_new(BalsaWindowSetupProgressInfo, 1);
-    info->progress_bar = g_object_ref(GTK_PROGRESS_BAR(window->progress_bar));
+    info->progress_bar = GTK_PROGRESS_BAR(g_object_ref(window->progress_bar));
     info->text = g_strdup(text);
     g_idle_add((GSourceFunc) bw_setup_progress_idle_cb, info);
 


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