commit | eb7b050a77011ed26f4645ee0d6dcc088eac905a | [log] [tgz] |
---|---|---|
author | Makoto Onuki <omakoto@google.com> | Thu Apr 26 11:10:27 2012 -0700 |
committer | Makoto Onuki <omakoto@google.com> | Thu Apr 26 11:18:54 2012 -0700 |
tree | b8f39bb09aa1d8222ef2ef2d9d4cbbe01d305ace | |
parent | afe795a28af8fb9d9977ff8d8b9216b871e76fdd [diff] [blame] |
Fix NPE in ContactLoader Bug 6402781 Change-Id: I9e18400731cf23cfc00344e90003879642405fe9
diff --git a/src/com/android/contacts/ContactLoader.java b/src/com/android/contacts/ContactLoader.java index 13d4122..fcc6510 100644 --- a/src/com/android/contacts/ContactLoader.java +++ b/src/com/android/contacts/ContactLoader.java
@@ -1345,6 +1345,10 @@ * contact. If the next load is for a different contact, the cached result will be dropped */ public void cacheResult() { - sCachedResult = new Result(mContact); + if (mContact == null) { + sCachedResult = null; + } else { + sCachedResult = new Result(mContact); + } } }