[gitg] Cancel update diff on dispose



commit 06c1c4a245a97efcf5ee7e3cf2a97f43c0efe017
Author: Jesse van den Kieboom <jessevdk gnome org>
Date:   Thu Aug 18 13:58:07 2016 +0200

    Cancel update diff on dispose

 libgitg/gitg-diff-view.vala |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/libgitg/gitg-diff-view.vala b/libgitg/gitg-diff-view.vala
index 4412676..2ebcdd0 100644
--- a/libgitg/gitg-diff-view.vala
+++ b/libgitg/gitg-diff-view.vala
@@ -192,6 +192,16 @@ public class Gitg.DiffView : Gtk.Grid
                d_diff_view_options.view = this;
        }
 
+       public override void dispose()
+       {
+               if (d_cancellable != null)
+               {
+                       d_cancellable.cancel();
+               }
+
+               base.dispose();
+       }
+
        private void parent_commit_changed()
        {
                update(false);


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