fixed crash

This commit is contained in:
Jenny White 2018-04-29 12:33:13 +03:00
parent 6f7e2c8398
commit ab7cbc0419

View File

@ -14,8 +14,11 @@ DEFINE_HOOKED_METHOD(GetUserCmd, CUserCmd *, IInput *this_, int sequence_number)
int oldcmd; int oldcmd;
INetChannel *ch; INetChannel *ch;
if (def == nullptr)
return def;
if (command_number_mod.find(def->command_number) != if (command_number_mod.find(def->command_number) !=
command_number_mod.end() && def != nullptr) command_number_mod.end())
{ {
// logging::Info("Replacing command %i with %i", def->command_number, // logging::Info("Replacing command %i with %i", def->command_number,
// command_number_mod[def->command_number]); // command_number_mod[def->command_number]);