Commit c57ab738 authored by Robert Knight's avatar Robert Knight

Fix crash when clearing file-based ('unlimited') history. Null pointer was not handled correctly.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=697511
parent 7609bebd
......@@ -690,7 +690,7 @@ HistoryScroll* HistoryTypeFile::scroll(HistoryScroll *old) const
HistoryScroll *newScroll = new HistoryScrollFile(m_fileName);
Character line[LINE_SIZE];
int lines = old->getLines();
int lines = (old != 0) ? old->getLines() : 0;
for(int i = 0; i < lines; i++)
{
int size = old->getLineLen(i);
......
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