Fix panic when tabs.popHistory is nonexistent
This commit is contained in:
parent
fe2fef4b75
commit
2f626ddd18
1 changed files with 1 additions and 1 deletions
|
@ -89,7 +89,7 @@ func (tabs *Tabs) Replace(contentSrc Drawable, contentTarget Drawable, name stri
|
||||||
|
|
||||||
func (tabs *Tabs) Select(index int) {
|
func (tabs *Tabs) Select(index int) {
|
||||||
if index >= len(tabs.Tabs) {
|
if index >= len(tabs.Tabs) {
|
||||||
panic("Tried to set tab index to a non-existing element")
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if tabs.Selected != index {
|
if tabs.Selected != index {
|
||||||
|
|
Loading…
Reference in a new issue