Quantcast

Protect against empty _icon properties in DebugListAllWaypoints(). Resolves #2.

Ludovicus [03-11-19 - 23:35]
Protect against empty _icon properties in DebugListAllWaypoints().  Resolves #2.
Filename
TomTom.lua
diff --git a/TomTom.lua b/TomTom.lua
index da4f255..afabcf0 100755
--- a/TomTom.lua
+++ b/TomTom.lua
@@ -1039,7 +1039,7 @@ function TomTom:DebugListAllWaypoints()
             local ctxt = RoundCoords(wp[2], wp[3], 2)
             local desc = wp.title and wp.title or L["Unknown waypoint"]
             local indent = "   "
-            self:Printf(L["%s%s - %s (map: %d) %s %s"], indent, desc, ctxt, wp[1], wp.minimap_icon, wp.worldmap_icon)
+            self:Printf(L["%s%s - %s %s %s"], indent, desc, ctxt, wp[1], (wp.minimap_icon or "*"), (wp.worldmap_icon or "*"))
         end
     end
 end