diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-10-23 10:05:40 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-10-27 09:04:34 +0000 |
commit | 87b8b73945affdf94c886bf17c43545c0a0d5d89 (patch) | |
tree | 3544cfe98d5c3016002ad0ab16deaffc5d275d1a /sources/shiboken2/ApiExtractor/abstractmetatype.cpp | |
parent | 5b87b64f6a6a2404d01f24b2c5a2189e406bddf8 (diff) |
shiboken2: Fix a potential crash in debug operator of AbstractMetaType
Bail out on invalid types whose type entry is 0.
Change-Id: I088c6f2d3374603266c3804279152e468a754312
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/abstractmetatype.cpp')
-rw-r--r-- | sources/shiboken2/ApiExtractor/abstractmetatype.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sources/shiboken2/ApiExtractor/abstractmetatype.cpp b/sources/shiboken2/ApiExtractor/abstractmetatype.cpp index 8ad2a937f..5d4375f23 100644 --- a/sources/shiboken2/ApiExtractor/abstractmetatype.cpp +++ b/sources/shiboken2/ApiExtractor/abstractmetatype.cpp @@ -685,6 +685,10 @@ AbstractMetaType AbstractMetaType::createVoid() #ifndef QT_NO_DEBUG_STREAM void AbstractMetaType::formatDebug(QDebug &debug) const { + if (!isValid()) { + debug << "Invalid"; + return; + } debug << '"' << name() << '"'; if (debug.verbosity() > 2) { auto te = typeEntry(); |