From 50faf9466caa94358de88d696f7bafa60729aeb5 Mon Sep 17 00:00:00 2001 From: Elias Bachaalany Date: Thu, 26 Jan 2023 22:46:35 -0800 Subject: [PATCH] fixed bugs introduced in the previous refactoring --- pywraps.hpp | 2 +- pywraps/py_kernwin.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pywraps.hpp b/pywraps.hpp index 719458b..0e7a6f2 100644 --- a/pywraps.hpp +++ b/pywraps.hpp @@ -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); } diff --git a/pywraps/py_kernwin.hpp b/pywraps/py_kernwin.hpp index 09f9d14..bf5f2de 100644 --- a/pywraps/py_kernwin.hpp +++ b/pywraps/py_kernwin.hpp @@ -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) ) {