Fix download request leak if it failed

This commit is contained in:
Benau 2019-11-29 22:31:53 +08:00
parent 9103a66651
commit 07a43e0ca3
2 changed files with 2 additions and 0 deletions

View File

@ -292,6 +292,7 @@ void AddonsLoading::onUpdate(float delta)
{
// Avoid displaying '-100%' in case of an error.
m_progress->setVisible(false);
m_download_request->setManageMemory(true);
dismiss();
new MessageDialog( _("Sorry, downloading the add-on failed"));
return;

View File

@ -178,6 +178,7 @@ void DownloadAssets::onUpdate(float delta)
{
// Avoid displaying '-100%' in case of an error.
m_progress->setVisible(false);
m_download_request->setManageMemory(true);
dismiss();
new MessageDialog(_("Sorry, downloading the add-on failed"));
return;