5f09348fe8
Unfortunately, loops and polys are generated, therefore we need to keep copies. Still not painting after this commit but at least no crash now.