mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-18 03:01:29 +00:00
[Bug Fix] Fix null pointer crash on zones that have not booted a zone yet with #reload commands or anything that calls GetZoneDescription (#2231)
This commit is contained in:
parent
162d34e1d9
commit
291aaea581
@ -60,6 +60,7 @@
|
||||
#include "../common/repositories/criteria/content_filter_criteria.h"
|
||||
#include "../common/repositories/content_flags_repository.h"
|
||||
#include "../common/repositories/zone_points_repository.h"
|
||||
#include "../common/serverinfo.h"
|
||||
|
||||
#include <time.h>
|
||||
#include <ctime>
|
||||
@ -2734,6 +2735,14 @@ uint32 Zone::GetCurrencyItemID(uint32 currency_id)
|
||||
|
||||
std::string Zone::GetZoneDescription()
|
||||
{
|
||||
if (!IsLoaded()) {
|
||||
return fmt::format(
|
||||
"{} PID ({})",
|
||||
IsStaticZone() ? "Static" : "Dynamic",
|
||||
EQ::GetPID()
|
||||
);
|
||||
}
|
||||
|
||||
auto d = fmt::format(
|
||||
"{} ({}){}{}",
|
||||
GetLongName(),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user