defensive nil checks around CanvasForObject

This commit is contained in:
Drew Weymouth
2026-03-01 08:24:16 -08:00
parent 12b5d33bbe
commit afb1c6c397
8 changed files with 30 additions and 13 deletions
+1 -1
View File
@@ -152,7 +152,7 @@ func (b *BrowsingPane) doSetPage(p Page) bool {
}
// TODO: reset focus only if something inside the previous page had focus
if c := fyne.CurrentApp().Driver().CanvasForObject(b); c != nil {
c.Focus(nil)
c.Unfocus()
}
b.curPage = p
if np, ok := p.(CanShowNowPlaying); ok {