aboutsummaryrefslogtreecommitdiffstats
path: root/generator/cppgenerator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'generator/cppgenerator.cpp')
-rw-r--r--generator/cppgenerator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp
index e410ae521..ea695280d 100644
--- a/generator/cppgenerator.cpp
+++ b/generator/cppgenerator.cpp
@@ -2458,7 +2458,7 @@ void CppGenerator::writeClassDefinition(QTextStream& s, const AbstractMetaClass*
else
deallocClassName = cppClassName;
tp_dealloc = "&SbkDeallocWrapper";
- tp_init = onlyPrivCtor ? "0" : cpythonFunctionName(ctors.first());
+ tp_init = onlyPrivCtor || ctors.isEmpty() ? "0" : cpythonFunctionName(ctors.first());
}
QString tp_getattro('0');