[Crash] Websocket Crash fix race when fetching log categories (#2456)

* [Crash] Websocket crash fix race

* Refine check
This commit is contained in:
Chris Miles 2022-09-28 21:29:04 -05:00 committed by GitHub
parent 554b41d424
commit c1626da40d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -829,7 +829,7 @@ Json::Value ApiGetZoneAttributes(EQ::Net::WebsocketServerConnection *connection,
Json::Value ApiGetLogsysCategories(EQ::Net::WebsocketServerConnection *connection, Json::Value params)
{
if (zone->GetZoneID() == 0) {
if (!zone || (zone && zone->GetZoneID() == 0)) {
throw EQ::Net::WebsocketException("Zone must be loaded to invoke this call");
}