From 6c6eafb05b11efda309ce9cfdbb0a89c5df3d74f Mon Sep 17 00:00:00 2001 From: An Leenders Date: Tue, 25 Jan 2011 17:38:19 +0100 Subject: [PATCH] cpp cleanliness: check for assignment to self --- svtools/source/control/ruler.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 7ce2b5c9e14f..d1b94e6d72dc 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -193,6 +193,9 @@ ImplRulerData::~ImplRulerData() ImplRulerData& ImplRulerData::operator=( const ImplRulerData& rData ) { + if( this == &rData ) + return *this; + delete[] pLines; delete[] pArrows; delete[] pBorders;