mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-03 18:53:52 +00:00
[Crash] Fix crash issue with dropping items and order of operations (#2939)
Should wait to null out invalid_drop until after it is used in log message.
This commit is contained in:
parent
2ae795fd61
commit
4a64048744
@ -848,13 +848,14 @@ void Client::DropItem(int16 slot_id, bool recurse)
|
||||
}
|
||||
}
|
||||
}
|
||||
invalid_drop = nullptr;
|
||||
|
||||
|
||||
std::string message = fmt::format(
|
||||
"Tried to drop an item on the ground that was no-drop! item_name [{}] item_id ({})",
|
||||
invalid_drop->GetItem()->Name,
|
||||
invalid_drop->GetItem()->ID
|
||||
);
|
||||
|
||||
invalid_drop = nullptr;
|
||||
RecordPlayerEventLog(PlayerEvent::POSSIBLE_HACK, PlayerEvent::PossibleHackEvent{.message = message});
|
||||
GetInv().DeleteItem(slot_id);
|
||||
return;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user