Skip to content

Commit

Permalink
Add funny haha null check.
Browse files Browse the repository at this point in the history
Hate this stupid issue.
  • Loading branch information
heyitsbench committed Sep 20, 2023
1 parent 149b178 commit 031242a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ptr_template.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,12 @@ class createTemplate : public PlayerScript {
do
{ // 0
QueryResult containerInfo = CharacterDatabase.Query("SELECT slot FROM character_inventory WHERE (bag = 0 AND guid = {})", (player->GetGUID().GetCounter()));

if (!containerInfo) // Apparently this can happen sometimes.
{
continue;
}

Field* bagFields = bagInfo->Fetch();
Field* containerFields = containerInfo->Fetch();
uint32 bagEntry = bagFields[0].Get<uint32>();
Expand Down

2 comments on commit 031242a

@Kitzunu
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bot

@heyitsbench
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bot

Please put it in a PR.

Please sign in to comment.