diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2012-11-27 12:54:50 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2012-11-27 15:53:48 +0100 |
commit | 9e09a073908ce67c3eef408157b6ff7b0da2d345 (patch) | |
tree | 83bb452d08e61ef930caefdc2e832f5c5da19b01 | |
parent | ae924c01ac6c1df5c286b1fda711c2d4d657ac42 (diff) |
Ensure the Executor never emits error() more than once.
This makes things easier for higher-level code.
Change-Id: I618531ae695fe088e37020c07646ebcc8db23f1a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
-rw-r--r-- | src/lib/buildgraph/executor.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/buildgraph/executor.cpp b/src/lib/buildgraph/executor.cpp index 3eb75f4fc..d1c609e98 100644 --- a/src/lib/buildgraph/executor.cpp +++ b/src/lib/buildgraph/executor.cpp @@ -762,6 +762,8 @@ void Executor::setState(ExecutorState s) void Executor::setError(const Error &e) { + if (m_state != ExecutorRunning) + return; setState(ExecutorError); cancelJobs(); emit error(e); |