craftyjs/Crafty — pull request #615 by starwed (2013-11-13 18:17:11+00:00)
Title: Logic error in "DebugPolygon"

Currently DebugPolygon iterates through the designated polygon, but uses the equivalent points in the hitmap for drawing. This can cause errors when they're not the same length, in addition to just being wrong!

Also, test that the polygon exists before trying to draw it.