diff options
author | Shauren <shauren.trinity@gmail.com> | 2015-03-08 16:29:13 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2015-03-08 16:29:13 +0100 |
commit | eb158e1847d41fa32378f4b98947ec5a88dbd1ae (patch) | |
tree | 00e7ee0e4b35b52eb457569a526dd6fb1a995b77 | |
parent | 50b4a3a707a92f3d9bce85a3af335061b7a6290d (diff) |
Core/DataStores: Fixed a crash happening when TaxiNodes.db2 fails to load
Closes #14313
-rw-r--r-- | src/server/game/DataStores/DB2Stores.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/server/game/DataStores/DB2Stores.cpp b/src/server/game/DataStores/DB2Stores.cpp index 3efb2297c93..df7496e4d94 100644 --- a/src/server/game/DataStores/DB2Stores.cpp +++ b/src/server/game/DataStores/DB2Stores.cpp @@ -242,9 +242,12 @@ void DB2Manager::LoadStores(std::string const& dataPath) // Initialize global taxinodes mask // include existed nodes that have at least single not spell base (scripted) path { - ASSERT(TaxiMaskSize >= ((sTaxiNodesStore.GetNumRows() - 1) / 8) + 1, - "TaxiMaskSize is not large enough to contain all taxi nodes! (current value %d, required %d)", - TaxiMaskSize, (((sTaxiNodesStore.GetNumRows() - 1) / 8) + 1)); + if (sTaxiNodesStore.GetNumRows()) + { + ASSERT(TaxiMaskSize >= ((sTaxiNodesStore.GetNumRows() - 1) / 8) + 1, + "TaxiMaskSize is not large enough to contain all taxi nodes! (current value %d, required %d)", + TaxiMaskSize, (((sTaxiNodesStore.GetNumRows() - 1) / 8) + 1)); + } std::set<uint32> spellPaths; for (SpellEffectEntry const* sInfo : sSpellEffectStore) |