FIX: fix crash issues when deleting filament during color painting

Signed-off-by: yifan.wu <yifan.wu@bambulab.com>
(cherry picked from commit 5c8405309b4a9f00fe004b0510283385464763cc)

Change-Id: I32150ac2707601ba74eec1cf2163b06764378664
This commit is contained in:
yifan.wu 2022-08-16 22:49:33 +08:00 committed by Lane.Wei
parent 8937d10071
commit b55d9672b9
2 changed files with 4 additions and 3 deletions

View file

@ -1091,7 +1091,7 @@ void TriangleSelectorPatch::render(ImGuiWrapper* imgui)
void TriangleSelectorPatch::update_triangles_per_type()
{
m_triangle_patches.resize((int)EnforcerBlockerType::ExtruderMax);
m_triangle_patches.resize((int)EnforcerBlockerType::ExtruderMax + 1);
for (int i = 0; i < m_triangle_patches.size(); i++) {
auto& patch = m_triangle_patches[i];
patch.type = (EnforcerBlockerType)i;