[view] fix: rare crash when updating table items

This commit is contained in:
Vinicius Moreira
2022-03-24 17:34:00 -03:00
parent e7701a96c6
commit d10255ed3e
2 changed files with 4 additions and 1 deletions

View File

@@ -9,6 +9,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Arch - Arch
- regression: not displaying ignored updates - regression: not displaying ignored updates
- UI:
- fix: rare crash when updating table items
## [0.10.0] 2022-03-14 ## [0.10.0] 2022-03-14
### Features ### Features

View File

@@ -659,7 +659,7 @@ class ManageWindow(QWidget):
self._reorganize() self._reorganize()
def _update_package_data(self, idx: int): def _update_package_data(self, idx: int):
if self.table_apps.isEnabled(): if self.table_apps.isEnabled() and self.pkgs is not None and 0 <= idx < len(self.pkgs):
pkg = self.pkgs[idx] pkg = self.pkgs[idx]
pkg.status = PackageViewStatus.READY pkg.status = PackageViewStatus.READY
self.table_apps.update_package(pkg) self.table_apps.update_package(pkg)