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