From 2f626ddd18e8472e0ddc2bb9013b7d01c1b5b9a9 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 25 Jul 2019 08:29:10 -0400 Subject: Fix panic when tabs.popHistory is nonexistent --- lib/ui/tab.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/ui/tab.go') diff --git a/lib/ui/tab.go b/lib/ui/tab.go index 7808db4d..a9b24a90 100644 --- a/lib/ui/tab.go +++ b/lib/ui/tab.go @@ -89,7 +89,7 @@ func (tabs *Tabs) Replace(contentSrc Drawable, contentTarget Drawable, name stri func (tabs *Tabs) Select(index int) { if index >= len(tabs.Tabs) { - panic("Tried to set tab index to a non-existing element") + return } if tabs.Selected != index { -- cgit