From b2b946c4f2f4361b31e35a0827a24dc751ae9208 Mon Sep 17 00:00:00 2001 From: Ken Arroyo Ohori Date: Wed, 11 Jan 2017 10:58:32 -0600 Subject: [PATCH] Fixed issue in Issue #2 --- src/MetalView.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/MetalView.swift b/src/MetalView.swift index d6c754c..324399f 100644 --- a/src/MetalView.swift +++ b/src/MetalView.swift @@ -471,6 +471,9 @@ class MetalView: MTKView { if parsedObject.id == rowObject.id { // Compute centroid + if parsedObject.triangleBuffersByType[""] == nil { + return + } let numberOfVertices = parsedObject.triangleBuffersByType[""]!.count/6 var sumX: Float = 0.0 var sumY: Float = 0.0