mirror of
https://github.com/KDE/konsole.git
synced 2026-05-18 19:47:16 -04:00
Check whether the pointer _shellProcess is null before using it.
This commit is contained in:
@@ -156,7 +156,7 @@ Session::Session(QObject* parent) :
|
||||
|
||||
void Session::openTeletype(int fd)
|
||||
{
|
||||
if (_shellProcess && isRunning())
|
||||
if ( isRunning() )
|
||||
{
|
||||
kWarning() << "Attempted to open teletype in a running session.";
|
||||
return;
|
||||
@@ -224,7 +224,7 @@ bool Session::hasDarkBackground() const
|
||||
}
|
||||
bool Session::isRunning() const
|
||||
{
|
||||
return _shellProcess->state() == QProcess::Running;
|
||||
return _shellProcess && ( _shellProcess->state() == QProcess::Running );
|
||||
}
|
||||
|
||||
void Session::setCodec(QTextCodec* codec)
|
||||
|
||||
Reference in New Issue
Block a user