mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-17 14:31:30 +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/criteria/content_filter_criteria.h"
|
||||||
#include "../common/repositories/content_flags_repository.h"
|
#include "../common/repositories/content_flags_repository.h"
|
||||||
#include "../common/repositories/zone_points_repository.h"
|
#include "../common/repositories/zone_points_repository.h"
|
||||||
|
#include "../common/serverinfo.h"
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
@ -2734,6 +2735,14 @@ uint32 Zone::GetCurrencyItemID(uint32 currency_id)
|
|||||||
|
|
||||||
std::string Zone::GetZoneDescription()
|
std::string Zone::GetZoneDescription()
|
||||||
{
|
{
|
||||||
|
if (!IsLoaded()) {
|
||||||
|
return fmt::format(
|
||||||
|
"{} PID ({})",
|
||||||
|
IsStaticZone() ? "Static" : "Dynamic",
|
||||||
|
EQ::GetPID()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
auto d = fmt::format(
|
auto d = fmt::format(
|
||||||
"{} ({}){}{}",
|
"{} ({}){}{}",
|
||||||
GetLongName(),
|
GetLongName(),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user