From c0c6f35099137f0843ce5e6f222855d7f59b5e8a Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Tue, 3 Sep 2019 12:28:04 +0200 Subject: [PATCH] fixed: use of iterator after erase --- test_util/EclRegressionTest.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test_util/EclRegressionTest.cpp b/test_util/EclRegressionTest.cpp index 7ad7a9895..da4b6520c 100644 --- a/test_util/EclRegressionTest.cpp +++ b/test_util/EclRegressionTest.cpp @@ -891,8 +891,9 @@ void ECLRegressionTest::results_smry() if (it != keywordsBlackList.end()){ blackListed.push_back(*keywit); - keywords1.erase(keywit); - --keywit; + keywit = keywords1.erase(keywit); + if (keywit != keywords1.end()) + --keywit; } }