Simplify code

This commit is contained in:
Scott Kostyshak 2015-04-04 14:56:29 -04:00
parent 7032b03748
commit 90772a01e7

View File

@ -607,13 +607,11 @@ QString SystemcallPrivate::exitStatusMessage() const
int SystemcallPrivate::exitCode()
{
if (!process_)
return -1;
// From Qt's documentation, in regards to QProcess::exitCode(),
// "This value is not valid unless exitStatus() returns NormalExit"
if (process_->exitStatus() != QProcess::NormalExit)
if (!process_ || process_->exitStatus() != QProcess::NormalExit)
return -1;
return process_->exitCode();
}