summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/pkgcachegen.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc
index 8e0301151..dfac0ae1c 100644
--- a/apt-pkg/pkgcachegen.cc
+++ b/apt-pkg/pkgcachegen.cc
@@ -557,10 +557,11 @@ bool pkgCacheGenerator::NewGroup(pkgCache::GrpIterator &Grp, StringView Name)
if (unlikely(Group == 0))
return false;
- Grp = pkgCache::GrpIterator(Cache, Cache.GrpP + Group);
map_stringitem_t const idxName = WriteStringInMap(Name);
if (unlikely(idxName == 0))
return false;
+
+ Grp = pkgCache::GrpIterator(Cache, Cache.GrpP + Group);
Grp->Name = idxName;
// Insert it into the hash table