From e79fbade975dd5e0bf5d8fc649b755c11c7956c4 Mon Sep 17 00:00:00 2001 From: zecke Date: Wed, 14 May 2003 14:43:13 +0000 Subject: Guard against self assignment --- (limited to 'libopie2') diff --git a/libopie2/opiepim/core/opimrecord.cpp b/libopie2/opiepim/core/opimrecord.cpp index 9510357..0c9734d 100644 --- a/libopie2/opiepim/core/opimrecord.cpp +++ b/libopie2/opiepim/core/opimrecord.cpp @@ -23,6 +23,8 @@ OPimRecord::OPimRecord( const OPimRecord& rec ) } OPimRecord &OPimRecord::operator=( const OPimRecord& rec) { + if ( this == &rec ) return *this; + Qtopia::Record::operator=( rec ); m_xrefman = rec.m_xrefman; m_lastHit = rec.m_lastHit; -- cgit v0.9.0.2