According to the [Canvas.drawVertices Javadoc](http://developer.android.com/reference/android/graphics/Canvas.html#drawVertices(android.graphics.Canvas.VertexMode, int, float[], int, float[], int, int[], int, short[], int, int, android.graphics.Paint)) it is valid to pass null as Paint, if also the texs parameter is null.
paint Specifies the shader to use if the texs array is non-null
When calling the drawVertices method with a null for Paint, this will cause a Null Pointer Exception.
because internally it calls
and
paint.mNativePaintwill cause a NullPointerException if paint is null. The doc forgot to tell you that paint can’t be null here 🙂Also painting vertices without paint does not seem to be logical since paint defines the line type etc. And the doc does not state
paint is optional.