Fix possible segfault

This commit is contained in:
Julian Kornberger 2016-12-15 10:42:40 +01:00
parent c2e50f59d4
commit 15487b3d1b
1 changed files with 5 additions and 0 deletions

View File

@ -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,