aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sources/shiboken6/ApiExtractor/abstractmetatype.cpp4
-rw-r--r--sources/shiboken6/generator/shiboken/overloaddata.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/sources/shiboken6/ApiExtractor/abstractmetatype.cpp b/sources/shiboken6/ApiExtractor/abstractmetatype.cpp
index 075315d58..dd61421e2 100644
--- a/sources/shiboken6/ApiExtractor/abstractmetatype.cpp
+++ b/sources/shiboken6/ApiExtractor/abstractmetatype.cpp
@@ -88,10 +88,12 @@ AbstractMetaTypeData::AbstractMetaTypeData(const TypeEntry *t) :
AbstractMetaType::AbstractMetaType(const TypeEntry *t) : d(new AbstractMetaTypeData(t))
{
+ Q_ASSERT(t);
}
-AbstractMetaType::AbstractMetaType() : d(new AbstractMetaTypeData(nullptr))
+AbstractMetaType::AbstractMetaType()
{
+ *this = AbstractMetaType::createVoid();
}
AbstractMetaType &AbstractMetaType::operator=(const AbstractMetaType &) = default;
diff --git a/sources/shiboken6/generator/shiboken/overloaddata.cpp b/sources/shiboken6/generator/shiboken/overloaddata.cpp
index 9cc492792..515dfd31d 100644
--- a/sources/shiboken6/generator/shiboken/overloaddata.cpp
+++ b/sources/shiboken6/generator/shiboken/overloaddata.cpp
@@ -442,7 +442,7 @@ void OverloadData::sortNextOverloads()
*/
OverloadData::OverloadData(const AbstractMetaFunctionCList &overloads,
const ApiExtractorResult &api)
- : m_minArgs(256), m_maxArgs(0), m_argPos(-1), m_argType(nullptr),
+ : m_minArgs(256), m_maxArgs(0), m_argPos(-1), m_argType(),
m_headOverloadData(this), m_previousOverloadData(nullptr),
m_api(api)
{