#407 TradeskillsPacket for tradeskill UI window crashes when spell does not exist

Closed
opened 2 years ago by image · 2 comments
image commented 2 years ago

TradeskillsPackets.cpp:408

vector<int32>   spells = client->GetPlayer()->GetSpellBookSpellIDBySkill(recipe->GetTechnique());
for (itr = spells.begin(); itr != spells.end(); itr++) {
        size++;
        Spell* spell = master_spell_list.GetSpell(*itr,1);
        if (size > 6) {
            // only 6 slots for skills on the ui
            break;
        }
        packet->setDataByName("skill_id", *itr   ,spell->GetSpellData()->ts_loc_index -1);
}

need a check for spell being null or we crash on GetSpellData

TradeskillsPackets.cpp:408 vector<int32> spells = client->GetPlayer()->GetSpellBookSpellIDBySkill(recipe->GetTechnique()); for (itr = spells.begin(); itr != spells.end(); itr++) { size++; Spell* spell = master_spell_list.GetSpell(*itr,1); if (size > 6) { // only 6 slots for skills on the ui break; } packet->setDataByName("skill_id", *itr ,spell->GetSpellData()->ts_loc_index -1); } need a check for spell being null or we crash on GetSpellData
devn00b commented 2 years ago
Owner

Fixed pending git update.

Fixed pending git update.
devn00b commented 2 years ago
Owner

54a61e0c39

I've seen, nor heard any further issues from this patch, closing related issues. I Will re-open if some problem pops back up.

https://git.eq2emu.com/devn00b/EQ2EMu/commit/54a61e0c391817e2e01cb5f93bc9fd8c13526afa I've seen, nor heard any further issues from this patch, closing related issues. I Will re-open if some problem pops back up.
Sign in to join this conversation.
Loading...
Cancel
Save
There is no content yet.