From bb33467da1a1cac1aaf5eecc89335088ab237eb7 Mon Sep 17 00:00:00 2001 From: tidwall Date: Tue, 23 Apr 2019 11:16:55 -0700 Subject: [PATCH] Fix crash with fence ROAM closes #440 --- internal/server/fence.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/server/fence.go b/internal/server/fence.go index 67c041a0..c1d65460 100644 --- a/internal/server/fence.go +++ b/internal/server/fence.go @@ -170,7 +170,7 @@ func fenceMatch( } sw.mu.Lock() var distance float64 - if fence.distance { + if fence.distance && fence.obj != nil { distance = details.obj.Distance(fence.obj) } sw.fmap = details.fmap