fixed bugs introduced in the previous refactoring

This commit is contained in:
Elias Bachaalany
2023-01-26 22:46:35 -08:00
parent 67748fc426
commit 50faf9466c
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1202,7 +1202,7 @@ protected:
py_id = newref_t(PyObject_GetAttrString(self, "id"));
if ( !py_id || !PyUnicode_Check(py_id.o) )
py_id = newref_t(PyObject_Repr(self));
if ( !py_id && PyUnicode_Check(py_id.o) )
if ( py_id && PyUnicode_Check(py_id.o) )
PyUnicode_as_qstring(&identifier, py_id.o);
}
+1 -1
View File
@@ -1190,7 +1190,7 @@ uint32 py_call_nav_colorizer(
return 0;
borref_t py_fun(PyDict_GetItemString(dict, "fun"));
borref_t py_ud(PyDict_GetItemString(dict, "ud"));
if ( py_fun
if ( !py_fun
|| !PyCapsule_IsValid(py_fun.o, VALID_CAPSULE_NAME)
|| !PyCapsule_IsValid(py_ud.o, VALID_CAPSULE_NAME) )
{