mluedke2/moonrunner — pull request #1 by micazeve (2014-08-15 08:30:12+00:00)
Title: [FIX] Crash when [locations count] == 1

Hello !
Thanks for the two-part RW tutorial, I kept me awaken until past midnight yesterday :)

Following the comments on part 1, I downloaded your smooth color method for the run. Sometimes, when the run is finished just after it was started, the array of locations contains only one element.

In colorSegmentsForLocations: method, then rawSpeeds array stays empty, so as smoothSpeeds, sortedArray, and the crash occurs when we try to get the medianSpeed from it.