diff options
author | Dianne Hackborn <hackbod@google.com> | 2010-12-09 13:14:12 -0800 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2010-12-09 13:14:12 -0800 |
commit | fb3806d68d51d336cba0ace697b1bae3e699a890 (patch) | |
tree | 30fe9acf661d73cd1ddc881312aead174f5d3af2 /core | |
parent | 6b82c266070a1ba8e703def509e1c9b6dc8e6788 (diff) | |
download | frameworks_base-fb3806d68d51d336cba0ace697b1bae3e699a890.zip frameworks_base-fb3806d68d51d336cba0ace697b1bae3e699a890.tar.gz frameworks_base-fb3806d68d51d336cba0ace697b1bae3e699a890.tar.bz2 |
Fix issue #3271486: SetupWizward NullPointerException in
andriod.app.ActivityThread.performStopActivityInner
Change-Id: Ifce73b7fc48fedb4767d759f70c98fcdee510f36
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/app/ActivityThread.java | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index 3dfb8016..449992e 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -2334,15 +2334,17 @@ public final class ActivityThread { } } - Canvas cv = mThumbnailCanvas; - if (cv == null) { - mThumbnailCanvas = cv = new Canvas(); - } - - cv.setBitmap(thumbnail); - if (!r.activity.onCreateThumbnail(thumbnail, cv)) { - mAvailThumbnailBitmap = thumbnail; - thumbnail = null; + if (thumbnail != null) { + Canvas cv = mThumbnailCanvas; + if (cv == null) { + mThumbnailCanvas = cv = new Canvas(); + } + + cv.setBitmap(thumbnail); + if (!r.activity.onCreateThumbnail(thumbnail, cv)) { + mAvailThumbnailBitmap = thumbnail; + thumbnail = null; + } } } catch (Exception e) { |