mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 16:02:00 +02:00
Check if player has widget before trying to focus it
This commit is contained in:
@@ -123,7 +123,13 @@ class ClapperHeaderBarPopover extends Gtk.PopoverMenu
|
||||
let root = this.get_root();
|
||||
let clapperWidget = root.get_child();
|
||||
|
||||
if(clapperWidget && clapperWidget.player)
|
||||
clapperWidget.player.widget.grab_focus();
|
||||
if(
|
||||
!clapperWidget
|
||||
|| !clapperWidget.player
|
||||
|| !clapperWidget.player.widget
|
||||
)
|
||||
return;
|
||||
|
||||
clapperWidget.player.widget.grab_focus();
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user