From a221e50cc2ed5c7008da01bb2bdbf025820251ea Mon Sep 17 00:00:00 2001 From: Fryguy Date: Tue, 20 Feb 2024 23:21:56 -0500 Subject: [PATCH] [Bug Fix] Add safety check to SummonAllCharacterCorpses. (#4107) Should prevent an empty vector from being passed to the repository. --- zone/zonedb.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index a2d8c04c3..d1e75f876 100644 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -3988,7 +3988,9 @@ bool ZoneDatabase::SummonAllCharacterCorpses( } } - CharacterCorpsesRepository::ReplaceMany(*this, l); + if (!l.empty()) { + CharacterCorpsesRepository::ReplaceMany(*this, l); + } return corpse_count > 0; }