From ae198ae04332e4f7176114de9cfab893b720af24 Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 13 Oct 2024 18:50:28 -0700 Subject: [PATCH] [Crash] Fixes a crash when the faction_list db table is empty. (#4511) Co-authored-by: KimLS --- zone/zonedb.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index bcfaa935d..3f0ac20e8 100644 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -3472,6 +3472,9 @@ bool ZoneDatabase::LoadFactionData() } auto& fmr_row = faction_max_results.begin(); + if (fmr_row[0] == nullptr) { + return false; + } max_faction = Strings::ToUnsignedInt(fmr_row[0]); faction_array = new Faction *[max_faction + 1];