alecjacobson / gptoolbox

Matlab toolbox for Geometry Processing.
MIT License
628 stars 166 forks source link

fix to the index out of range bug in png2poly #136

Closed lvrma closed 2 years ago

lvrma commented 2 years ago

When there are too many smoothing iterations for an image, png2poly crashes with an "index 1 out of range" error.

This size check (admittedly, not the most elegant solution) fixes the bug!