From 8ad3eaa72b654d21ec660b1d3b9c0a7543495791 Mon Sep 17 00:00:00 2001 From: Ludovicus Date: Mon, 24 Jun 2019 19:29:43 -0400 Subject: [PATCH] Bug #447: hbd:GetZoneDistance() may return nil --- TomTom_POIIntegration.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TomTom_POIIntegration.lua b/TomTom_POIIntegration.lua index 94ce985..09bfcd5 100755 --- a/TomTom_POIIntegration.lua +++ b/TomTom_POIIntegration.lua @@ -81,7 +81,7 @@ local function ObjectivesChanged() if x and y then local dist = hbd:GetZoneDistance(map, px, py, map, x, y) - if dist < closestdist then + if dist and (dist < closestdist) then closest = watchIndex closestdist = dist end -- 1.7.9.5