summaryrefslogtreecommitdiffstats
path: root/src/Array.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Array.cpp')
-rw-r--r--src/Array.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Array.cpp b/src/Array.cpp
index 49b8924..784df7c 100644
--- a/src/Array.cpp
+++ b/src/Array.cpp
@@ -62,6 +62,8 @@ Array::Array(const PList::Array& a) : Structure(a.GetParent())
Array& Array::operator=(const PList::Array& a)
{
+ if (this == &a) return *this;
+
plist_free(_node);
for (size_t it = 0; it < _array.size(); it++) {
delete _array.at(it);