src/ui/polygonobjecteditor.cpp

changeset 84
7137c20979af
parent 83
b8bd338eb602
child 86
4bec0525ef1b
--- a/src/ui/polygonobjecteditor.cpp	Wed Mar 18 15:52:16 2020 +0200
+++ b/src/ui/polygonobjecteditor.cpp	Wed Mar 18 15:54:30 2020 +0200
@@ -38,7 +38,7 @@
 void PolygonObjectEditor::updateNumRows()
 {
 	const ldraw::Object* object = model->get(this->storedObjectId);
-	const int numPoints = object->numPoints();
+	const int numPoints = object != nullptr ? object->numPoints() : 0;
 	for (int i = 0; i < countof(this->vec3Editors); i += 1)
 	{
 		Vec3Editor& editor = *this->vec3Editors[i];

mercurial