Check if a vertex has a 2D position before placing it in cairo_draw()

This fixes #171