Commit 55a83c05 authored by Akarsh Simha's avatar Akarsh Simha

Fix crashes in KSDssDownloader

Must use deleteLater() as there may still be events to process

This seems to fix the crash (at least I cannot reproduce it as easily
any more)
parent f5a4b8cc
......@@ -232,7 +232,7 @@ void KSDssDownloader::singleDownloadFinished()
m_TempFile.open();
m_TempFile.write(downloadJob->downloadedData());
m_TempFile.close();
delete (downloadJob);
downloadJob->deleteLater();
// Check if we have a proper DSS image or the DSS server failed
QMimeDatabase mdb;
......@@ -256,7 +256,7 @@ void KSDssDownloader::downloadAttemptFinished()
// FIXME: do SDSS-y things
emit downloadComplete( false );
deleteLater();
delete (downloadJob);
downloadJob->deleteLater();
return;
}
else
......@@ -264,7 +264,7 @@ void KSDssDownloader::downloadAttemptFinished()
m_TempFile.open();
m_TempFile.write(downloadJob->downloadedData());
m_TempFile.close();
delete (downloadJob);
downloadJob->deleteLater();
// Check if we have a proper DSS image or the DSS server failed
QMimeDatabase mdb;
......
......@@ -86,6 +86,7 @@ bool NameResolver::NameResolverInternals::sesameResolver( class CatalogEntryData
}
QXmlStreamReader xml( response->readAll() );
response->deleteLater();
if( xml.atEnd() ) {
// file is empty
msg = xi18n("Empty result instead of expected XML from CDS Sesame! Maybe bad internet connection?");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment