summaryrefslogtreecommitdiff
path: root/lotuswordpro/source/filter/lwpobjfactory.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'lotuswordpro/source/filter/lwpobjfactory.cxx')
-rw-r--r--lotuswordpro/source/filter/lwpobjfactory.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/lotuswordpro/source/filter/lwpobjfactory.cxx b/lotuswordpro/source/filter/lwpobjfactory.cxx
index b58989908155..127770bd8d5d 100644
--- a/lotuswordpro/source/filter/lwpobjfactory.cxx
+++ b/lotuswordpro/source/filter/lwpobjfactory.cxx
@@ -701,7 +701,12 @@ rtl::Reference<LwpObject> LwpObjectFactory::QueryObject(const LwpObjectID &objID
return nullptr;
}
+ if (std::find(m_aObjsIDInCreation.begin(), m_aObjsIDInCreation.end(), objID) != m_aObjsIDInCreation.end())
+ throw std::runtime_error("recursion in object creation");
+
+ m_aObjsIDInCreation.push_back(objID);
obj = CreateObject(objHdr.GetTag(), objHdr);
+ m_aObjsIDInCreation.pop_back();
}
return obj;
}