fix: more nil pointers

This commit is contained in:
Slug-Boi
2025-04-16 13:26:28 +02:00
parent a84843c48a
commit a0880457f7
+2 -2
View File
@@ -296,7 +296,7 @@ func (m model_ca) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
m.quitting = false m.quitting = false
return m, nil return m, nil
} }
if parent_m.keys != nil { if parent_m != nil {
return model{list: parent_m.list}, tea.ClearScreen return model{list: parent_m.list}, tea.ClearScreen
} else { } else {
m.quitting = true m.quitting = true
@@ -462,7 +462,7 @@ func (m *model_ca) AddAuthor() bool {
author := m.inputs[0].Value() author := m.inputs[0].Value()
if parent_m.keys != nil { if parent_m != nil {
item_str := utils.Users[author].Username + " - " + utils.Users[author].Email item_str := utils.Users[author].Username + " - " + utils.Users[author].Email
dupProtect[item_str] = author dupProtect[item_str] = author
parent_m.list.InsertItem(len(parent_m.list.Items())+1, item(item_str)) parent_m.list.InsertItem(len(parent_m.list.Items())+1, item(item_str))