[TD]Fix CosmeticVertex size

This commit is contained in:
wandererfan
2020-06-09 09:06:26 -04:00
committed by WandererFan
parent 134f5fd340
commit dd0273ff4e
5 changed files with 15 additions and 4 deletions

View File

@@ -206,6 +206,8 @@ void CosmeticVertexPy::setSize(Py::Object arg)
PyObject* p = arg.ptr();
if (PyFloat_Check(p)) {
size = PyFloat_AsDouble(p);
} else if (PyLong_Check(p)) {
size = (double) PyLong_AsLong(p);
} else {
throw Py::TypeError("expected (float)");
}