Coverity: Dereference before null check

This commit is contained in:
wmayer
2020-07-19 16:15:21 +02:00
parent 0a6929a122
commit fdd6d341c7

View File

@@ -414,10 +414,8 @@ PyObject* ViewProviderPy::partialRender(PyObject* args)
#endif
else {
std::string error = std::string("type must be str or unicode");
if (item) {
error += " not, ";
error += item->ob_type->tp_name;
}
error += " not, ";
error += item->ob_type->tp_name;
throw Base::TypeError(error);
}
}