aboutsummaryrefslogtreecommitdiffstats
path: root/executor/executor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'executor/executor.cc')
-rw-r--r--executor/executor.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/executor/executor.cc b/executor/executor.cc
index 7a0c115b8..a262bff83 100644
--- a/executor/executor.cc
+++ b/executor/executor.cc
@@ -521,11 +521,13 @@ public:
if (used_)
fail("recursion in CoverAccessScope");
used_ = true;
- cover_unprotect(cov_);
+ if (flag_coverage)
+ cover_unprotect(cov_);
}
~CoverAccessScope()
{
- cover_protect(cov_);
+ if (flag_coverage)
+ cover_protect(cov_);
used_ = false;
}