summaryrefslogtreecommitdiffstats
path: root/Source/kwsys
diff options
context:
space:
mode:
Diffstat (limited to 'Source/kwsys')
-rw-r--r--Source/kwsys/RegularExpression.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/kwsys/RegularExpression.cxx b/Source/kwsys/RegularExpression.cxx
index 3566a65..6a62351 100644
--- a/Source/kwsys/RegularExpression.cxx
+++ b/Source/kwsys/RegularExpression.cxx
@@ -77,6 +77,10 @@ RegularExpression::RegularExpression (const RegularExpression& rxp) {
// operator= -- Copies the given regular expression.
RegularExpression& RegularExpression::operator= (const RegularExpression& rxp)
{
+ if(this == &rxp)
+ {
+ return *this;
+ }
if ( !rxp.program )
{
this->program = 0;