mirror of
https://github.com/OPM/ResInsight.git
synced 2026-11-02 09:00:14 -06:00
Fix crash issue with empty blocks when removing block keywords from file deck
This commit is contained in:
1 parent
188a52cd1e
commit
f7154a8146
2 files changed
+5
-2
No files matched your search
@@ -1014,7 +1014,6 @@ int RifOpmFlowDeckFile::removeKeywords( const std::string& keywordName )
|
|||||||
const auto& kw = m_fileDeck->operator[]( it );
|
const auto& kw = m_fileDeck->operator[]( it );
|
||||||
if ( kw.name() == keywordName )
|
if ( kw.name() == keywordName )
|
||||||
{
|
{
|
||||||
skipIndices.push_back( it );
|
|
||||||
// If this is a block keyword, we need to skip all keywords until the corresponding end block
|
// If this is a block keyword, we need to skip all keywords until the corresponding end block
|
||||||
if ( blockKeywordNames.contains( keywordName ) )
|
if ( blockKeywordNames.contains( keywordName ) )
|
||||||
{
|
{
|
||||||
@@ -1031,6 +1030,10 @@ int RifOpmFlowDeckFile::removeKeywords( const std::string& keywordName )
|
|||||||
it++;
|
it++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
skipIndices.push_back( it );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
Submodule ThirdParty/custom-opm-common/opm-common updated: 5a32e52fa5...78d59f54cb.
Reference in new issue
Block a user