summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cc4group.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cc4group.c b/src/cc4group.c
index 724a8b5..2b5a6b4 100644
--- a/src/cc4group.c
+++ b/src/cc4group.c
@@ -2144,7 +2144,6 @@ static C4GroupEntryData* cc4group_createEntry(CC4Group* const this, const char*
entry.data = NULL;
entry.memoryManagement = cc4group.MemoryManagement.Reference;
- entry.children = GroupEntryListNew();
C4GroupEntryCore_init(&entry.core);
C4GroupEntryCore_setFileName(&entry.core, targetName);
@@ -2166,6 +2165,7 @@ static bool cc4group_createDirectory(CC4Group* const this, const char* const pat
return false;
}
+
C4GroupHeader* header = malloc(sizeof(C4GroupHeader));
if(header == NULL)
@@ -2174,6 +2174,8 @@ static bool cc4group_createDirectory(CC4Group* const this, const char* const pat
return NULL;
}
+ entry->children = GroupEntryListNew();
+
C4GroupHeader_init(header);
C4GroupHeader_setOfficial(header, C4GroupHeader_isOfficial(entry->parent->header));
C4GroupHeader_setMaker(header, entry->parent->header->Maker);