<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1459,13 +1459,16 @@ bool Pet::unlearnSpell(uint32 spell_id, bool learn_prev, bool clear_ab)
 {
     if(removeSpell(spell_id,learn_prev,clear_ab))
     {
-        if(GetOwner()-&gt;GetTypeId() == TYPEID_PLAYER)
+        if(!m_loading)
         {
-            if(!m_loading)
+            if (Unit* owner = GetOwner())
             {
-                WorldPacket data(SMSG_PET_REMOVED_SPELL, 4);
-                data &lt;&lt; uint32(spell_id);
-                ((Player*)GetOwner())-&gt;GetSession()-&gt;SendPacket(&amp;data);
+                if(owner-&gt;GetTypeId() == TYPEID_PLAYER)
+                {
+                    WorldPacket data(SMSG_PET_REMOVED_SPELL, 4);
+                    data &lt;&lt; uint32(spell_id);
+                    ((Player*)owner)-&gt;GetSession()-&gt;SendPacket(&amp;data);
+                }
             }
         }
         return true;</diff>
      <filename>src/game/Pet.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
 #ifndef __REVISION_NR_H__
 #define __REVISION_NR_H__
- #define REVISION_NR &quot;8118&quot;
+ #define REVISION_NR &quot;8119&quot;
 #endif // __REVISION_NR_H__</diff>
      <filename>src/shared/revision_nr.h</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4a054a44cd4ff0a29691660fa34cf72fedbf184c</id>
    </parent>
  </parents>
  <author>
    <name>VladimirMangos</name>
    <email>vladimir@getmangos.com</email>
  </author>
  <url>http://github.com/mangos/mangos/commit/02c84fc56da186c0f93074d729a1c641080134dd</url>
  <id>02c84fc56da186c0f93074d729a1c641080134dd</id>
  <committed-date>2009-07-05T02:58:16-07:00</committed-date>
  <authored-date>2009-07-05T02:56:31-07:00</authored-date>
  <message>[8119] Speedup code and prevent crash at pet stats reset in time owner not in world.</message>
  <tree>8f8bcb0c276265fb2355815bf7bbae56cfabd140</tree>
  <committer>
    <name>VladimirMangos</name>
    <email>vladimir@getmangos.com</email>
  </committer>
</commit>
