From 15487b3d1b4181afd95dc021a0a72f8dc6646ff7 Mon Sep 17 00:00:00 2001 From: Julian Kornberger Date: Thu, 15 Dec 2016 10:42:40 +0100 Subject: [PATCH] Fix possible segfault --- models/nodes.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/models/nodes.go b/models/nodes.go index d3a4ad6..27f2c7b 100644 --- a/models/nodes.go +++ b/models/nodes.go @@ -102,6 +102,11 @@ func (nodes *Nodes) GetNodesMini() *meshviewer.Nodes { for nodeID := range nodes.List { node, _ := meshviewerNodes.List[nodeID] nodeOrigin := nodes.List[nodeID] + + if nodeOrigin.Statistics == nil { + continue + } + if node == nil { node = &meshviewer.Node{ Firstseen: nodeOrigin.Firstseen,