Fix crash involving polygon being too empty

Wed, 15 Jun 2022 12:32:50 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Wed, 15 Jun 2022 12:32:50 +0300
changeset 225
551c136b459e
parent 224
54fd83d4db9c
child 226
60d6b797a12e

Fix crash involving polygon being too empty

src/document.cpp file | annotate | diff | comparison | revisions
--- a/src/document.cpp	Wed Jun 15 12:32:40 2022 +0300
+++ b/src/document.cpp	Wed Jun 15 12:32:50 2022 +0300
@@ -413,4 +413,5 @@
 		Q_EMIT this->modelAction(action);
 	}
 	this->polygon.clear();
+	this->polygon.push_back(this->worldPosition.value_or(glm::vec3{0, 0, 0}));
 }

mercurial