Don't delete ZipInstaller instances directly.
Schedule them for deletion instead of deleting them. That way pending events can still be handled before the main loop deletes them. Fixes crashes on the second download during installation. Change-Id: I7c718dbb0200a64d1aa3bbb6c2839282fb965dec
This commit is contained in:
parent
6aeecf5e2c
commit
ef9eea7fd2
1 changed files with 3 additions and 3 deletions
|
@ -387,7 +387,7 @@ void SelectiveInstallWidget::installRockbox(void)
|
|||
ServerInfo::RelCandidateUrl).toString();
|
||||
|
||||
//! install build
|
||||
if(m_zipinstaller != NULL) delete m_zipinstaller;
|
||||
if(m_zipinstaller != NULL) m_zipinstaller->deleteLater();
|
||||
m_zipinstaller = new ZipInstaller(this);
|
||||
m_zipinstaller->setUrl(url);
|
||||
m_zipinstaller->setLogSection("Rockbox (Base)");
|
||||
|
@ -431,7 +431,7 @@ void SelectiveInstallWidget::installFonts(void)
|
|||
fontsurl.replace("%RELEASEVER%", relversion);
|
||||
|
||||
// create new zip installer
|
||||
if(m_zipinstaller != NULL) delete m_zipinstaller;
|
||||
if(m_zipinstaller != NULL) m_zipinstaller->deleteLater();
|
||||
m_zipinstaller = new ZipInstaller(this);
|
||||
m_zipinstaller->setUrl(fontsurl);
|
||||
m_zipinstaller->setLogSection("Fonts");
|
||||
|
@ -491,7 +491,7 @@ void SelectiveInstallWidget::installGamefiles(void)
|
|||
}
|
||||
qDebug() << "[SelectiveInstallWidget] installing gamefiles";
|
||||
// create new zip installer
|
||||
if(m_zipinstaller != NULL) delete m_zipinstaller;
|
||||
if(m_zipinstaller != NULL) m_zipinstaller->deleteLater();
|
||||
m_zipinstaller = new ZipInstaller(this);
|
||||
|
||||
m_zipinstaller->setUrl(SystemInfo::value(SystemInfo::DoomUrl).toString());
|
||||
|
|
Loading…
Reference in a new issue