Skip to content

Commit ebba18d

Browse files
committed
Add more checks
1 parent 7cb0c80 commit ebba18d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/WindowActorFetcher.vala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
/*
7-
* Sends a signal when a window texture is ready.
7+
* Sends a signal when a window actor is ready.
88
* Useful when you need to use window actor when the window was created.
99
*/
1010
public class Gala.WindowActorFetcher : GLib.Object {
@@ -17,11 +17,11 @@ public class Gala.WindowActorFetcher : GLib.Object {
1717
}
1818

1919
construct {
20-
start_check.begin ();
21-
}
22-
23-
private async void start_check () {
2420
Idle.add (() => {
21+
if (window == null) {
22+
return Source.REMOVE;
23+
}
24+
2525
unowned var window_actor = (Meta.WindowActor) window.get_compositor_private ();
2626

2727
if (window_actor != null) {

0 commit comments

Comments
 (0)