commit | 5b843179ff2a5e09e35756ec6145220e9f08acf5 | [log] [tgz] |
---|---|---|
author | Treehugger Robot <treehugger-gerrit@google.com> | Wed Aug 23 08:01:45 2017 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Wed Aug 23 08:01:45 2017 +0000 |
tree | 452376cb17b35a12dec9ff962448dcdeee45cb3f | |
parent | 71f6de410f183d27485775172cb00f9c9f59951c [diff] | |
parent | fbac608cfefba27892d27ababe277b89998a8809 [diff] |
Merge "Fix static analyzer warnings."
diff --git a/libs/binder/Value.cpp b/libs/binder/Value.cpp index fd1dfd5..85cd739 100644 --- a/libs/binder/Value.cpp +++ b/libs/binder/Value.cpp
@@ -182,10 +182,12 @@ 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; }