mirror of
https://github.com/elementary/gala.git
synced 2024-11-23 20:07:21 +03:00
ScreenshotManager: Null-check the window in screenshot_window() (#627)
This commit is contained in:
parent
909832a3e5
commit
d1d415c9f0
@ -115,6 +115,11 @@ namespace Gala
|
||||
#else
|
||||
var window = wm.get_screen ().get_display ().get_focus_window ();
|
||||
#endif
|
||||
|
||||
if (window == null) {
|
||||
throw new DBusError.FAILED ("Cannot find active window");
|
||||
}
|
||||
|
||||
var window_actor = (Meta.WindowActor) window.get_compositor_private ();
|
||||
unowned Meta.ShapedTexture window_texture = (Meta.ShapedTexture) window_actor.get_texture ();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user