Kaydet (Commit) 22fc8c63 authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz#6208 Indirect-leak

Change-Id: I8d6761bd951cc1ddd4a45eabb26428bc40c2271a
Reviewed-on: https://gerrit.libreoffice.org/49600Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 10b6a2b2
...@@ -105,6 +105,7 @@ public: ...@@ -105,6 +105,7 @@ public:
protected: protected:
XFContent() XFContent()
: m_bDoingToXml(false) : m_bDoingToXml(false)
, m_bInserted(false)
{ {
} }
...@@ -115,6 +116,8 @@ protected: ...@@ -115,6 +116,8 @@ protected:
OUString m_strStyleName; OUString m_strStyleName;
private: private:
bool m_bDoingToXml; bool m_bDoingToXml;
public:
bool m_bInserted;
}; };
#endif #endif
......
...@@ -70,6 +70,9 @@ XFContentContainer::~XFContentContainer() ...@@ -70,6 +70,9 @@ XFContentContainer::~XFContentContainer()
void XFContentContainer::Add(XFContent *pContent) void XFContentContainer::Add(XFContent *pContent)
{ {
if (pContent->m_bInserted)
throw std::runtime_error("already inserted");
pContent->m_bInserted = true;
m_aContents.emplace_back(pContent); m_aContents.emplace_back(pContent);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment