]> git.lyx.org Git - lyx.git/blobdiff - src/support/Systemcall.cpp
Fix build with GNU libstdc++ C++11 ABI
[lyx.git] / src / support / Systemcall.cpp
index 2f277f6b9ec060cdfc665b525a47ad1ab55301ca..28cbdc89999d8721616a700d88d306b16dc59b08 100644 (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();
 }