[Libreoffice-commits] .: lotuswordpro/source
Julien Nabet
serval2412 at kemper.freedesktop.org
Sat Jul 14 10:59:10 PDT 2012
lotuswordpro/source/filter/xfilter/xfparastyle.cxx | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 528b406bc2b9cc6dcbce54303f024d32fbe41e3f
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Jul 14 19:48:09 2012 +0200
Check for assignment to self for =operator
Change-Id: I88369c1b0c6f261e8350d196b56acdc8f8f61ce8
diff --git a/lotuswordpro/source/filter/xfilter/xfparastyle.cxx b/lotuswordpro/source/filter/xfilter/xfparastyle.cxx
index 0909f29..1bccbcd 100644
--- a/lotuswordpro/source/filter/xfilter/xfparastyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfparastyle.cxx
@@ -134,6 +134,9 @@ XFParaStyle::XFParaStyle(const XFParaStyle& other) : XFStyle(other)
XFParaStyle& XFParaStyle::operator=(const XFParaStyle& other)
{
+ // Check for self-assignment
+ if (this == &other)
+ return *this;
m_strParentStyleName = other.m_strParentStyleName;
m_nFlag = other.m_nFlag;
m_eAlignType = other.m_eAlignType;
More information about the Libreoffice-commits
mailing list