Skip to content

Commit

Permalink
dirty temporary fix to #3909
Browse files Browse the repository at this point in the history
  • Loading branch information
matwachich authored and andydotxyz committed Sep 29, 2023
1 parent f17ccd8 commit 8a807f9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions container/doctabs.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,13 @@ func (r *docTabsRenderer) buildTabButtons(count int, buttons *fyne.Container) {

func (r *docTabsRenderer) scrollToSelected() {
buttons := r.scroller.Content.(*fyne.Container)

// https://github.com/fyne-io/fyne/issues/3909
// very dirty temporary fix to this crash!
if r.docTabs.current < 0 || r.docTabs.current >= len(buttons.Objects) {
return
}

button := buttons.Objects[r.docTabs.current]
pos := button.Position()
size := button.Size()
Expand Down

0 comments on commit 8a807f9

Please sign in to comment.