36 } |
36 } |
37 |
37 |
38 void PolygonObjectEditor::updateNumRows() |
38 void PolygonObjectEditor::updateNumRows() |
39 { |
39 { |
40 const ldraw::Object* object = model->get(this->storedObjectId); |
40 const ldraw::Object* object = model->get(this->storedObjectId); |
41 const int numPoints = object->numPoints(); |
41 const int numPoints = object != nullptr ? object->numPoints() : 0; |
42 for (int i = 0; i < countof(this->vec3Editors); i += 1) |
42 for (int i = 0; i < countof(this->vec3Editors); i += 1) |
43 { |
43 { |
44 Vec3Editor& editor = *this->vec3Editors[i]; |
44 Vec3Editor& editor = *this->vec3Editors[i]; |
45 if (i < numPoints) |
45 if (i < numPoints) |
46 { |
46 { |