diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2011-03-02 09:13:27 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2011-03-02 09:16:17 -0300 |
commit | 2d70150f416772b5efc9fb8c669c8c6cedc0146f (patch) | |
tree | 0e8c5f32ece7948147fd6e1be0459b651935360d | |
parent | 1e76df322a8a476e2898f27878c3edc5b9f72b9a (diff) | |
download | shiboken-2d70150f416772b5efc9fb8c669c8c6cedc0146f.tar.gz shiboken-2d70150f416772b5efc9fb8c669c8c6cedc0146f.tar.xz shiboken-2d70150f416772b5efc9fb8c669c8c6cedc0146f.zip |
Added a check on CppGenerator::writeClassDefinition for when there's no constructor for a class.
-rw-r--r-- | generator/cppgenerator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp index e410ae52..ea695280 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'); |