Browse Source

Fixed cache creation

Seems to sometimes be needed on MSVS at least
Lemongrass3110 3 years ago
parent
commit
bdb2ae3446
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/common/database.hpp

+ 3 - 0
src/common/database.hpp

@@ -171,6 +171,9 @@ public:
 	}
 	}
 
 
 	void loadingFinished() override{
 	void loadingFinished() override{
+		this->cache.clear();
+		this->cache.resize( this->size(), nullptr );
+
 		// Cache all known values
 		// Cache all known values
 		for (auto &pair : *this) {
 		for (auto &pair : *this) {
 			// Calculate the key that should be used
 			// Calculate the key that should be used