Crash fix

The other thing needs to be looked at too, but I guess we never run
into an issue where this actually is a nullptr because bad things
would happen here ...
This commit is contained in:
Michael Cook (mackal) 2016-08-13 15:09:43 -04:00
parent 4e4d82857c
commit f01c890966

View File

@ -455,7 +455,7 @@ bool SharedDatabase::GetSharedBank(uint32 id, Inventory *inv, bool is_charid)
}
}
if (row[9]) {
if (inst && row[9]) {
std::string data_str(row[9]);
std::string idAsString;
std::string value;
@ -480,6 +480,7 @@ bool SharedDatabase::GetSharedBank(uint32 id, Inventory *inv, bool is_charid)
}
}
// theoretically inst can be nullptr ... this would be very bad ...
put_slot_id = inv->PutItem(slot_id, *inst);
safe_delete(inst);