fix warning

This commit is contained in:
wmayer
2017-11-14 21:47:56 +01:00
parent 04ea295280
commit 8c7bb0cd55
4 changed files with 7 additions and 8 deletions

View File

@@ -209,7 +209,7 @@ PyObject* UnitsApi::sSchemaTranslate(PyObject * /*self*/, PyObject *args,PyObjec
quant = *static_cast<Base::QuantityPy*>(q)->getQuantityPtr();
std::unique_ptr<UnitsSchema> schema(createSchema(static_cast<UnitSystem>(index)));
if (!schema) {
if (!schema.get()) {
PyErr_SetString(PyExc_ValueError, "invalid schema value");
return 0;
}