mirror of
https://github.com/elementary/gala.git
synced 2024-09-11 15:15:39 +03:00
background: Avoid dangling reference to Background instances
Make sure all references gets dropped on destroy and it gets finalized.
This commit is contained in:
parent
9f6b9313db
commit
ea7c28515d
@ -51,7 +51,7 @@ namespace Gala
|
||||
construct
|
||||
{
|
||||
background = new Meta.Background (screen);
|
||||
background.set_data<Background> ("delegate", this);
|
||||
background.set_data<unowned Background> ("delegate", this);
|
||||
|
||||
file_watches = new Gee.HashMap<string,ulong> ();
|
||||
cancellable = new Cancellable ();
|
||||
|
@ -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<Background> ("delegate");
|
||||
var background = new_background_actor.background.get_data<unowned Background> ("delegate");
|
||||
|
||||
if (background.is_loaded) {
|
||||
swap_background_actor ();
|
||||
|
Loading…
Reference in New Issue
Block a user