forked from Leak_Technologies/VideoTools
Handle GetWindow error return for mpv embed
This commit is contained in:
parent
2e4b433f01
commit
19c3d1e3ad
|
|
@ -72,7 +72,7 @@ func newPane() *pane {
|
|||
}
|
||||
p.mpv = mpv
|
||||
|
||||
if w, ok := da.GetWindow(); ok && w != nil {
|
||||
if w, err := da.GetWindow(); err == nil && w != nil {
|
||||
if xid := getWindowID(w); xid != 0 {
|
||||
_ = mpv.SetWID(xid)
|
||||
}
|
||||
|
|
@ -215,4 +215,3 @@ func getWindowID(w *gdk.Window) uint64 {
|
|||
func gdkWindowGetXID(w *gdk.Window) uint {
|
||||
return uint(w.GetXID())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user