lotuswordpro/source/filter/xfilter/xfparastyle.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 528b406bc2b9cc6dcbce54303f024d32fbe41e3f
Author: Julien Nabet <serval2...@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;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to