diff options
author | Siva Velusamy <vsiva@google.com> | 2014-02-27 13:44:15 -0800 |
---|---|---|
committer | Siva Velusamy <vsiva@google.com> | 2014-02-27 13:45:02 -0800 |
commit | 2e373d66acc88c311ef6c82dddf561d90186b1e1 (patch) | |
tree | a2022e07fbdb4f745587db28e165bff0f6006bdd /ddms | |
parent | 40c219888c299c30f5f0a7103d2cf4af7cf19d7b (diff) | |
download | swt-2e373d66acc88c311ef6c82dddf561d90186b1e1.tar.gz |
40209: Fix NPE in ddms screenshot task
Change-Id: I9c95513c86050d4c4a8f8525c2a229a68b953cb8
Diffstat (limited to 'ddms')
-rw-r--r-- | ddms/ddmuilib/src/main/java/com/android/ddmuilib/ScreenShotDialog.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ddms/ddmuilib/src/main/java/com/android/ddmuilib/ScreenShotDialog.java b/ddms/ddmuilib/src/main/java/com/android/ddmuilib/ScreenShotDialog.java index b0f885a..c3b751a 100644 --- a/ddms/ddmuilib/src/main/java/com/android/ddmuilib/ScreenShotDialog.java +++ b/ddms/ddmuilib/src/main/java/com/android/ddmuilib/ScreenShotDialog.java @@ -125,10 +125,12 @@ public class ScreenShotDialog extends Dialog { // so to preserve the current rotation we must call getRotated() // the same number of times the user has done it manually. // TODO: improve the RawImage class. - for (int i=0; i < mRotateCount; i++) { - mRawImage = mRawImage.getRotated(); + if (mRawImage != null) { + for (int i = 0; i < mRotateCount; i++) { + mRawImage = mRawImage.getRotated(); + } + updateImageDisplay(shell); } - updateImageDisplay(shell); } }); |