diff options
author | Christian Tismer <tismer@stackless.com> | 2022-01-03 18:14:49 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-01-03 20:08:01 +0000 |
commit | 4ac0760d66d5e59aec688a4f96b3b1e4bd89769f (patch) | |
tree | 2da112fa21d607a694cd2e86d7bc0546450c8981 | |
parent | 58a8f93bd454a87c3b5008dd42452af42cbcf356 (diff) |
__feature__: Fix a bug in true_property
This was a wrong condition that checked for the true_property
flag, but not the actual existence.
Change-Id: I9fa4c7a9c907f23fd15405fe5d747060dddfc6d0
Fixes: PYSIDE-1757
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
(cherry picked from commit 159adca779f67afcbe669d298572fb0ea57a4236)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | sources/shiboken6/libshiboken/signature/signature.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/shiboken6/libshiboken/signature/signature.cpp b/sources/shiboken6/libshiboken/signature/signature.cpp index a8a17ec14..f1d329dbb 100644 --- a/sources/shiboken6/libshiboken/signature/signature.cpp +++ b/sources/shiboken6/libshiboken/signature/signature.cpp @@ -534,7 +534,7 @@ static PyObject *adjustFuncName(const char *func_name) // Compute all needed info. PyObject *name = String::getSnakeCaseName(_name, lower); - PyObject *prop_name; + PyObject *prop_name{}; if (is_prop) { PyObject *prop_methods = PyDict_GetItem(dict, PyMagicName::property_methods()); prop_name = PyDict_GetItem(prop_methods, name); @@ -546,7 +546,7 @@ static PyObject *adjustFuncName(const char *func_name) // Finally, generate the correct path expression. char _buf[250 + 1] = {}; - if (is_prop) { + if (prop_name) { auto _prop_name = String::toCString(prop_name); if (is_class_prop) sprintf(_buf, "%s.__dict__['%s'].fset", _path, _prop_name); |