aboutsummaryrefslogtreecommitdiffstats
path: root/abstractmetabuilder.cpp
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-02-10 21:51:57 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-09 19:10:14 -0300
commit6fc7f20b4c876d93ecbb22a36c6a026a4b604f5d (patch)
tree906d583c861c9f7c7249cc44ebc478ee45a0275f /abstractmetabuilder.cpp
parent181789982339a85ae6ad7a973816b2adeb48739a (diff)
Moved down AbstractMetaType creation line to avoid possible memory leak.
Diffstat (limited to 'abstractmetabuilder.cpp')
-rw-r--r--abstractmetabuilder.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/abstractmetabuilder.cpp b/abstractmetabuilder.cpp
index 9b36447d0..e3fd33a05 100644
--- a/abstractmetabuilder.cpp
+++ b/abstractmetabuilder.cpp
@@ -1869,7 +1869,6 @@ AbstractMetaFunction* AbstractMetaBuilder::traverseFunction(FunctionModelItem fu
AbstractMetaType* AbstractMetaBuilder::translateType(double vr, const AddedFunction::TypeInfo& typeInfo)
{
Q_ASSERT(!typeInfo.name.isEmpty());
- AbstractMetaType* metaType = createMetaType();
TypeDatabase* typeDb = TypeDatabase::instance();
TypeEntry* type;
@@ -1882,6 +1881,7 @@ AbstractMetaType* AbstractMetaBuilder::translateType(double vr, const AddedFunct
typeDb->addType(type);
}
+ AbstractMetaType* metaType = createMetaType();
metaType->setTypeEntry(type);
metaType->setIndirections(typeInfo.indirections);
metaType->setReference(typeInfo.isReference);