Quantcast

sigprof issue #357: Death in the Ritual of Doom.

Ludovicus [08-04-18 - 17:31]
sigprof issue #357: Death in the Ritual of Doom.
Filename
TomTom_Corpse.lua
diff --git a/TomTom_Corpse.lua b/TomTom_Corpse.lua
index b06accd..57050a7 100755
--- a/TomTom_Corpse.lua
+++ b/TomTom_Corpse.lua
@@ -103,7 +103,12 @@ eventFrame:SetScript("OnEvent", function(self, event, arg1, ...)
     elseif event == "PLAYER_DEAD" then
         m = C_Map.GetBestMapForUnit("player")
         if not IsInInstance() then
-            x,y = C_Map.GetPlayerMapPosition(m, "player"):GetXY()
+            x = nil
+            y = nil
+            local player = C_Map.GetPlayerMapPosition(m, "player")
+            if player then
+                x,y = player:GetXY()
+            end
         end
         StartCorpseSearch()
     elseif event == "PLAYER_UNGHOST" then