mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 15:46:26 -04:00
Users have filed issues with crash reports that seem to indicate that the FileTreeViewModel gets swapped out (by a refresh) while a call to itemsSelected is in progress, iterating over the previous items. Guard against this by locking the mutex that we already have for this for the duration of the call. I don't have a good way of testing whether the fix helps, because the crashes only occurred very infrequently. Let's just see if the crash reports stop coming in after we ship this. Note also that this is only the minimal fix for the crashes that were reported. Theoretically, the same problem could happen for a key handler itself, but we never saw reports about that, so we don't bother doing anything about that yet. Note also that long-term I envision a different solution to this class of problems (discussed in https://github.com/jesseduffield/lazygit/issues/2974), that's why I want to avoid locking mutexes more than necessary now. |
||
|---|---|---|
| .. | ||
| app | ||
| cheatsheet | ||
| commands | ||
| common | ||
| config | ||
| constants | ||
| env | ||
| fakes | ||
| gui | ||
| i18n | ||
| integration | ||
| jsonschema | ||
| logs | ||
| snake | ||
| tasks | ||
| theme | ||
| updates | ||
| utils | ||