diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2011-02-10 21:51:57 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-09 19:10:14 -0300 |
commit | 6fc7f20b4c876d93ecbb22a36c6a026a4b604f5d (patch) | |
tree | 906d583c861c9f7c7249cc44ebc478ee45a0275f | |
parent | 181789982339a85ae6ad7a973816b2adeb48739a (diff) |
Moved down AbstractMetaType creation line to avoid possible memory leak.
-rw-r--r-- | abstractmetabuilder.cpp | 2 |
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); |