[App] remove superfluous nullptr checks

This commit is contained in:
Uwe
2022-07-18 03:12:01 +02:00
parent b801e7151a
commit e69a920f18
12 changed files with 55 additions and 54 deletions

View File

@@ -808,7 +808,7 @@ PyObject *DocumentPy::getCustomAttributes(const char* attr) const
App::Property* prop = getPropertyContainerPtr()->getPropertyByName(attr);
if (prop)
return nullptr;
if (this->ob_type->tp_dict == nullptr) {
if (!this->ob_type->tp_dict) {
if (PyType_Ready(this->ob_type) < 0)
return nullptr;
}
@@ -830,7 +830,7 @@ int DocumentPy::setCustomAttributes(const char* attr, PyObject *)
App::Property* prop = getPropertyContainerPtr()->getPropertyByName(attr);
if (prop)
return 0;
if (this->ob_type->tp_dict == nullptr) {
if (!this->ob_type->tp_dict) {
if (PyType_Ready(this->ob_type) < 0)
return 0;
}