Fix possible segfault

This commit is contained in:
Julian Kornberger 2016-12-15 10:42:40 +01:00
parent c2e50f59d4
commit 15487b3d1b

View File

@ -102,6 +102,11 @@ func (nodes *Nodes) GetNodesMini() *meshviewer.Nodes {
for nodeID := range nodes.List { for nodeID := range nodes.List {
node, _ := meshviewerNodes.List[nodeID] node, _ := meshviewerNodes.List[nodeID]
nodeOrigin := nodes.List[nodeID] nodeOrigin := nodes.List[nodeID]
if nodeOrigin.Statistics == nil {
continue
}
if node == nil { if node == nil {
node = &meshviewer.Node{ node = &meshviewer.Node{
Firstseen: nodeOrigin.Firstseen, Firstseen: nodeOrigin.Firstseen,