summaryrefslogtreecommitdiffstats
path: root/raul/Array.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'raul/Array.hpp')
-rw-r--r--raul/Array.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/raul/Array.hpp b/raul/Array.hpp
index 5ba57a5..cac993d 100644
--- a/raul/Array.hpp
+++ b/raul/Array.hpp
@@ -67,6 +67,10 @@ public:
Array<T>& operator=(const Array<T>& array)
{
+ if (&array == this) {
+ return *this;
+ }
+
_size = array._size;
_elems = _size ? new T[_size] : nullptr;