src/ui/polygonobjecteditor.cpp

changeset 84
7137c20979af
parent 83
b8bd338eb602
child 86
4bec0525ef1b
equal deleted inserted replaced
83:b8bd338eb602 84:7137c20979af
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 {

mercurial