diff options
-rw-r--r-- | raul/Atom.hpp | 3 | ||||
-rw-r--r-- | raul/Configuration.hpp | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/raul/Atom.hpp b/raul/Atom.hpp index 8717964..c657fbf 100644 --- a/raul/Atom.hpp +++ b/raul/Atom.hpp @@ -59,6 +59,9 @@ public: } Atom& operator=(const Atom& other) { + if (&other == this) { + return *this; + } dealloc(); _size = other._size; _type = other._type; diff --git a/raul/Configuration.hpp b/raul/Configuration.hpp index f01809d..554b247 100644 --- a/raul/Configuration.hpp +++ b/raul/Configuration.hpp @@ -80,6 +80,9 @@ public: Value& operator=(const Value& other) { + if (&other == this) { + return *this; + } if (_type == STRING) { free(_val._string); } |