libshiboken: Fix a crash in Shiboken::Object::isValid() for Python 3.11
authorFriedemann Kleint <Friedemann.Kleint@qt.io>
Thu, 9 Jun 2022 14:50:41 +0000 (16:50 +0200)
committerDmitry Shachnev <mitya57@debian.org>
Sun, 1 Oct 2023 20:43:44 +0000 (21:43 +0100)
commit521bdb9fdaeee6548a0af0decf4797ba97cb43bb
treed22fbe54aeabb6086eb790f7aeafaf3513209f87
parentaea7cfebd372578765e4317e919ae5b75d574153
libshiboken: Fix a crash in Shiboken::Object::isValid() for Python 3.11

The function is passed type objects for class methods, which caused
it to crash.

The first clause did not catch this, and so it was cast to SbkObject
below.

Add a type check to prevent this.

Pick-to: 6.3 6.2 5.15
Task-number: PYSIDE-1960
Change-Id: Icfdd6fefb7156ac5961444bd5395109849a1d66e
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 52df3b8f64d08f412d7f8b12d82fc0ae6f3c741d)

Gbp-Pq: Name libshiboken-Fix-a-crash-in-Shiboken-Object-isValid.patch
sources/shiboken2/libshiboken/basewrapper.cpp