From ea7c28515d8729aca07621b16c87f05eb0e9abee Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Sun, 19 Feb 2017 16:50:40 +0100 Subject: [PATCH] background: Avoid dangling reference to Background instances Make sure all references gets dropped on destroy and it gets finalized. --- src/Background/Background.vala | 2 +- src/Background/BackgroundManager.vala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Background/Background.vala b/src/Background/Background.vala index 2f7362cb..cdf0a182 100644 --- a/src/Background/Background.vala +++ b/src/Background/Background.vala @@ -51,7 +51,7 @@ namespace Gala construct { background = new Meta.Background (screen); - background.set_data ("delegate", this); + background.set_data ("delegate", this); file_watches = new Gee.HashMap (); cancellable = new Cancellable (); diff --git a/src/Background/BackgroundManager.vala b/src/Background/BackgroundManager.vala index 6d77eeb0..4ab5c307 100644 --- a/src/Background/BackgroundManager.vala +++ b/src/Background/BackgroundManager.vala @@ -101,7 +101,7 @@ namespace Gala new_background_actor.brightness = background_actor.brightness; new_background_actor.visible = background_actor.visible; - var background = new_background_actor.background.get_data ("delegate"); + var background = new_background_actor.background.get_data ("delegate"); if (background.is_loaded) { swap_background_actor ();