[view.qt] fix: QT crash in case the file downloader thread is still alive

This commit is contained in:
Vinicius Moreira
2023-11-28 17:22:05 -03:00
parent 656661b7b8
commit 442ef76035
3 changed files with 12 additions and 2 deletions

View File

@@ -1127,6 +1127,9 @@ class URLFileDownloader(QThread):
self._stop = False
def _get(self, url_: str, id_: Optional[object]):
if self._stop:
return
try:
res = requests.get(url=url_, timeout=self._request_timeout)
content = res.content if res.status_code == 200 else None