[Crash] Fixes a crash when the faction_list db table is empty. (#4511)

Co-authored-by: KimLS <KimLS@peqtgc.com>
This commit is contained in:
Alex 2024-10-13 18:50:28 -07:00 committed by GitHub
parent 520943ebf1
commit ae198ae043
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3472,6 +3472,9 @@ bool ZoneDatabase::LoadFactionData()
} }
auto& fmr_row = faction_max_results.begin(); auto& fmr_row = faction_max_results.begin();
if (fmr_row[0] == nullptr) {
return false;
}
max_faction = Strings::ToUnsignedInt(fmr_row[0]); max_faction = Strings::ToUnsignedInt(fmr_row[0]);
faction_array = new Faction *[max_faction + 1]; faction_array = new Faction *[max_faction + 1];