summaryrefslogtreecommitdiffstats
path: root/c++/src/H5PredType.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c++/src/H5PredType.cpp')
-rw-r--r--c++/src/H5PredType.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/c++/src/H5PredType.cpp b/c++/src/H5PredType.cpp
index 6f1e5df..510c659 100644
--- a/c++/src/H5PredType.cpp
+++ b/c++/src/H5PredType.cpp
@@ -237,8 +237,11 @@ const PredType PredType::NATIVE_UINT_LEAST64( H5T_NATIVE_UINT_LEAST64 );
//--------------------------------------------------------------------------
PredType& PredType::operator=( const PredType& rhs )
{
- copy(rhs);
- return(*this);
+ if (this != &rhs)
+ {
+ copy(rhs);
+ return(*this);
+ }
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS