mirror of
https://github.com/ddworken/hishtory.git
synced 2024-11-26 18:23:27 +01:00
Fix NPE that occurs if the initial sqlite query is slow, the user starts typing, and then the latter query is faster and completes first, by forcing an update of the table if it is nil before calling SetRows() on it
This commit is contained in:
parent
6d5a86a8bb
commit
ec44e94565
@ -227,7 +227,7 @@ func updateTable(m model, rows []table.Row, entries []*data.HistoryEntry, search
|
||||
if m.table != nil {
|
||||
initialCursor = m.table.Cursor()
|
||||
}
|
||||
if forceUpdateTable {
|
||||
if forceUpdateTable || m.table == nil {
|
||||
t, err := makeTable(m.ctx, rows)
|
||||
if err != nil {
|
||||
m.fatalErr = err
|
||||
|
Loading…
Reference in New Issue
Block a user