Removed the call of clearDataForMimeJob on a null pointer

tjob pointer is checked for being null (result of the dynamic_cast)
and then passed to clearDataForMimeJob. The issue can be solved by
replacing tjob with job in the problematic line, but since the
mimeTypeRetrieved method called later already processes jobs that
are not KIO::TransferJob, there is no purpose in doing it here as well.

Change-Id: I863ac41ad66ac3cbceca82adeab85498315a5e42
This commit is contained in:
Ivan Čukić 2014-10-17 09:15:06 +02:00
parent adf92d4573
commit e346b50cd8

View File

@ -420,14 +420,8 @@ void ContainmentInterface::clearDataForMimeJob(KIO::Job *job)
void ContainmentInterface::dropJobResult(KJob *job)
{
#ifndef PLASMA_NO_KIO
KIO::TransferJob *tjob = dynamic_cast<KIO::TransferJob *>(job);
if (!tjob) {
qDebug() << "job is not a KIO::TransferJob, won't handle the drop...";
clearDataForMimeJob(tjob);
return;
}
if (job->error()) {
qDebug() << "ERROR" << tjob->error() << ' ' << tjob->errorString();
qDebug() << "ERROR" << job->error() << ' ' << job->errorString();
}
// We call mimetypeRetrieved since there might be other mechanisms
// for finding suitable applets. Cleanup happens there as well.