mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 00:11:59 +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 root = this.get_root();
|
||||||
let clapperWidget = root.get_child();
|
let clapperWidget = root.get_child();
|
||||||
|
|
||||||
if(clapperWidget && clapperWidget.player)
|
if(
|
||||||
clapperWidget.player.widget.grab_focus();
|
!clapperWidget
|
||||||
|
|| !clapperWidget.player
|
||||||
|
|| !clapperWidget.player.widget
|
||||||
|
)
|
||||||
|
return;
|
||||||
|
|
||||||
|
clapperWidget.player.widget.grab_focus();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user