Fix for potential bug with new GP Fill
authorJoshua Leung <aligorith@gmail.com>
Thu, 28 Apr 2016 15:25:48 +0000 (03:25 +1200)
committerJoshua Leung <aligorith@gmail.com>
Sun, 8 May 2016 12:53:49 +0000 (00:53 +1200)
commitaf8a54bd8dd40b9a9bdad60f6d58dc920dcd0b87
tree864366f7aba946207f3ccc4a4d7a0807cc2535d2
parentf5ddcfeb031176becb40c2bd9ad226466c6ddff7
Fix for potential bug with new GP Fill

While trying to track down why I still keep getting some random "extra" triangles
showing up when reloading files with fills, I noticed that there's an index mismatch
here that may cause problems in some rare cases:

There are "gps->totpoints" items in tmp_triangles, but there should only be
"gps->tot_triangles" triangles in the gps->triangles array. If for whatever reason
some of the triangles in tmp_triangles are invalid, this could have meant that
while a tmp_triangles candidate was skipped, a corresponding slot for a valid
triangle also got skipped.
source/blender/editors/gpencil/drawgpencil.c