diff options
author | Tor Norbye <tnorbye@google.com> | 2011-02-07 11:05:19 -0800 |
---|---|---|
committer | Android Code Review <code-review@android.com> | 2011-02-07 11:05:19 -0800 |
commit | 972d2761e3be1300186a474ff141e1c66724750a (patch) | |
tree | a8c13f863817382847d304a63af7159f5e559ad4 /eclipse | |
parent | 904d2c28bbc90869fcb9793893476d80941e357f (diff) | |
parent | 9a12855724cfb8a2f209d3d716628cf2415024c0 (diff) | |
download | sdk-972d2761e3be1300186a474ff141e1c66724750a.zip sdk-972d2761e3be1300186a474ff141e1c66724750a.tar.gz sdk-972d2761e3be1300186a474ff141e1c66724750a.tar.bz2 |
Merge "Guard against NPE"
Diffstat (limited to 'eclipse')
-rw-r--r-- | eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PreviewIconFactory.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PreviewIconFactory.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PreviewIconFactory.java index 31bb948..e3e9e05 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PreviewIconFactory.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PreviewIconFactory.java @@ -191,9 +191,10 @@ public class PreviewIconFactory { Pair<RGB, RGB> themeColors = getColorsFromTheme(); RGB bg = themeColors.getFirst(); RGB fg = themeColors.getSecond(); - storeBackground(imageDir, bg, fg); - - overrideBgColor = Integer.valueOf(ImageUtils.rgbToInt(bg, 0xFF)); + if (bg != null) { + storeBackground(imageDir, bg, fg); + overrideBgColor = Integer.valueOf(ImageUtils.rgbToInt(bg, 0xFF)); + } } } |