Don't crash when saving session data; don't use a reference to a freed

object.
BUG: 232584

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1108633
This commit is contained in:
Will Stephenson
2010-03-29 13:24:57 +00:00
parent 3138e80fd6
commit 158564674c

View File

@@ -1393,11 +1393,11 @@ void SaveHistoryTask::jobResult(KJob* job)
KMessageBox::sorry( 0 , i18n("A problem occurred when saving the output.\n%1",job->errorString()) );
}
SaveJob& info = _jobSession[job];
TerminalCharacterDecoder * decoder = _jobSession[job].decoder;
_jobSession.remove(job);
delete info.decoder;
delete decoder;
// notify the world that the task is done
emit completed(true);