diff options
Diffstat (limited to 'libs/binder/Value.cpp')
-rw-r--r-- | libs/binder/Value.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libs/binder/Value.cpp b/libs/binder/Value.cpp index fd1dfd5ada..85cd739411 100644 --- a/libs/binder/Value.cpp +++ b/libs/binder/Value.cpp @@ -182,10 +182,12 @@ Value& Value::swap(Value &rhs) Value& Value::operator=(const Value& rhs) { - delete mContent; - mContent = rhs.mContent - ? rhs.mContent->clone() - : NULL; + if (this != &rhs) { + delete mContent; + mContent = rhs.mContent + ? rhs.mContent->clone() + : NULL; + } return *this; } |