Fix possible crash when opening Dolphin with an enabled Terminal. Thanks to Dario Andres for the analyses!

BUG: 202953

svn path=/trunk/KDE/kdebase/apps/; revision=1011008
This commit is contained in:
Peter Penz 2009-08-13 19:12:49 +00:00
parent c0922a81d8
commit 54093338c4

View file

@ -90,11 +90,10 @@ void TerminalPanel::showEvent(QShowEvent* event)
m_terminalWidget = part->widget();
m_layout->addWidget(m_terminalWidget);
m_terminal = qobject_cast<TerminalInterfaceV2 *>(part);
m_terminal->showShellInDir(url().path());
}
}
if (m_terminal != 0) {
m_terminal->showShellInDir(url().path());
m_terminal->sendInput("cd " + KShell::quoteArg(url().path()) + '\n');
m_terminal->sendInput("clear\n");
m_terminalWidget->setFocus();