summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2012-07-14 19:48:09 +0200
committerJulien Nabet <serval2412@yahoo.fr>2012-07-14 19:58:57 +0200
commit528b406bc2b9cc6dcbce54303f024d32fbe41e3f (patch)
tree566d354ab16adb0d671204631552f489f0395740 /lotuswordpro
parent938824ca84c46ca1a1b627a94d95ba8b24f26b65 (diff)
Check for assignment to self for =operator
Change-Id: I88369c1b0c6f261e8350d196b56acdc8f8f61ce8
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/xfilter/xfparastyle.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/lotuswordpro/source/filter/xfilter/xfparastyle.cxx b/lotuswordpro/source/filter/xfilter/xfparastyle.cxx
index 0909f29b78db..1bccbcdcbd71 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;