Quantcast

Make RemoveWaypoint return on nil, because race conditions.

Ludovicus [12-02-20 - 18:54]
Make RemoveWaypoint return on nil, because race conditions.
Filename
TomTom.lua
diff --git a/TomTom.lua b/TomTom.lua
index 153bfa8..278385b 100755
--- a/TomTom.lua
+++ b/TomTom.lua
@@ -811,6 +811,7 @@ end
 local function noop() end

 function TomTom:RemoveWaypoint(uid)
+    if not uid then return end
     if type(uid) ~= "table" then error("TomTom:RemoveWaypoint(uid) UID is not a table."); end
     local data = uid
     self:ClearWaypoint(uid)