summaryrefslogtreecommitdiffstats
path: root/src/Key.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Key.cpp')
-rw-r--r--src/Key.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Key.cpp b/src/Key.cpp
index 86a0bf8..459227a 100644
--- a/src/Key.cpp
+++ b/src/Key.cpp
@@ -40,6 +40,8 @@ Key::Key(const PList::Key& k) : Node(PLIST_INT)
Key& Key::operator=(const PList::Key& k)
{
+ if (this == &k) return *this;
+
plist_free(_node);
_node = plist_copy(k.GetPlist());
return *this;