diff --git a/apps/nexus/nexus.cpp b/apps/nexus/nexus.cpp index 590f17e3..c68497d2 100644 --- a/apps/nexus/nexus.cpp +++ b/apps/nexus/nexus.cpp @@ -76,8 +76,10 @@ void Nexus::Close() { unsigned int size = index.size(); //size of index fwrite(&size, sizeof(unsigned int), 1, index_file); - fwrite(&index[0], sizeof(Entry), size, index_file); + fwrite(&(index[0]), sizeof(Entry), size, index_file); fclose(index_file); + index_file = NULL; + patches.Close(); borders.Close(); }