mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-17 09:14:34 +00:00
fix(Core): Fixed a few crashes/bugs that were found via static code analysis (#2617)
This commit is contained in:
@@ -603,11 +603,12 @@ public:
|
||||
static bool HandleNpcSetOriginalFaction(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
Player* me = handler->GetSession()->GetPlayer();
|
||||
Creature* creature = me->GetSelectedUnit()->ToCreature();
|
||||
|
||||
if (!me)
|
||||
return false;
|
||||
|
||||
Creature* creature = me->GetSelectedUnit()->ToCreature();
|
||||
|
||||
if (!creature)
|
||||
return false;
|
||||
|
||||
|
||||
@@ -371,6 +371,12 @@ public:
|
||||
|
||||
if (show == "del")
|
||||
{
|
||||
if (!arg_id)
|
||||
{
|
||||
handler->SendSysMessage("|cffff33ffERROR: Waypoint script guid not present.|r");
|
||||
return true;
|
||||
}
|
||||
|
||||
id = atoi(arg_id);
|
||||
|
||||
PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_WAYPOINT_SCRIPT_ID_BY_GUID);
|
||||
|
||||
Reference in New Issue
Block a user