diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx index 004cffacc494..78334c70c8fe 100644 --- a/l10ntools/source/merge.cxx +++ b/l10ntools/source/merge.cxx @@ -21,7 +21,9 @@ #include #include +#include #include +#include #include #include @@ -298,7 +300,11 @@ void MergeDataFile::InsertEntry( if( !pMergeEntrys ) { pMergeEntrys = new MergeEntrys; - aMap.emplace( sKey, std::unique_ptr(pMergeEntrys) ); + if (!aMap.emplace( sKey, std::unique_ptr(pMergeEntrys) ).second) + { + std::cerr << "Duplicate entry " << sKey << "\n"; + std::exit(EXIT_FAILURE); + } }