support possible error

This commit is contained in:
Piotr Miller
2021-06-17 13:59:22 +02:00
parent f4f1f8edec
commit 31fc1e75cc
2 changed files with 5 additions and 3 deletions

Binary file not shown.

View File

@@ -314,11 +314,13 @@ func main() {
// Focus 1st pinned item if any, otherwise focus 1st found app icon
var button gtk.IWidget
if pinnedFlowBox.GetChildren().Length() > 0 {
button, _ = pinnedFlowBox.GetChildAtIndex(0).GetChild()
button, err = pinnedFlowBox.GetChildAtIndex(0).GetChild()
} else {
button, _ = appFlowBox.GetChildAtIndex(0).GetChild()
button, err = appFlowBox.GetChildAtIndex(0).GetChild()
}
if err == nil {
button.ToWidget().GrabFocus()
}
button.ToWidget().GrabFocus()
userDirsMap = mapXdgUserDirs()