aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@theqtcompany.com>2014-11-24 15:23:49 +0100
committerChristian Kandeler <christian.kandeler@theqtcompany.com>2014-12-01 12:14:06 +0100
commite39f2d8395997a19880a743bd89706db466b18f4 (patch)
tree1621697b19439af4e6c6def6c3fcdd4a2de4e051
parentbe93bcdf9f0c50bcc88557e3f2568568f13ae0bd (diff)
Fix potential exception leak.
Change-Id: Iddb70d32bd44a4282b2e5ebd809582344917c1ca Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
-rw-r--r--src/lib/corelib/buildgraph/executor.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/corelib/buildgraph/executor.cpp b/src/lib/corelib/buildgraph/executor.cpp
index afe0522f8..775674862 100644
--- a/src/lib/corelib/buildgraph/executor.cpp
+++ b/src/lib/corelib/buildgraph/executor.cpp
@@ -866,10 +866,9 @@ void Executor::onJobFinished(const qbs::ErrorInfo &err)
}
}
- ExecutorJob * const job = qobject_cast<ExecutorJob *>(sender());
- QBS_CHECK(job);
-
try {
+ ExecutorJob * const job = qobject_cast<ExecutorJob *>(sender());
+ QBS_CHECK(job);
finishJob(job, !err.hasError());
} catch (const ErrorInfo &error) {
handleError(error);