mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-11 07:38:36 +00:00
Added some nullptr checks for ItemInst* in a few places (tradeskills.cpp - particularly augments - needs a better review)
This commit is contained in:
@@ -200,6 +200,9 @@ bool QuestParserCollection::SpellHasQuestSub(uint32 spell_id, QuestEventID evt)
|
||||
}
|
||||
|
||||
bool QuestParserCollection::ItemHasQuestSub(ItemInst *itm, QuestEventID evt) {
|
||||
if (itm == nullptr)
|
||||
return false;
|
||||
|
||||
std::string item_script;
|
||||
if(itm->GetItem()->ScriptFileID != 0) {
|
||||
item_script = "script_";
|
||||
@@ -350,6 +353,8 @@ int QuestParserCollection::EventPlayerGlobal(QuestEventID evt, Client *client, s
|
||||
|
||||
int QuestParserCollection::EventItem(QuestEventID evt, Client *client, ItemInst *item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQEmu::Any> *extra_pointers) {
|
||||
// needs pointer validation check on 'item' argument
|
||||
|
||||
std::string item_script;
|
||||
if(item->GetItem()->ScriptFileID != 0) {
|
||||
item_script = "script_";
|
||||
|
||||
Reference in New Issue
Block a user