diff options
author | Xavier Ducrohet <xav@android.com> | 2011-06-28 18:20:06 -0700 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2011-06-28 18:20:06 -0700 |
commit | 26a409b48dd80d94b8aa5e36902a51d57b6c431c (patch) | |
tree | 5ffb1fb14311311edf130e186b75d91d46fadc09 /ide_common | |
parent | 061a8035bcad183d729b59d137e1fd0cc169c677 (diff) | |
download | sdk-26a409b48dd80d94b8aa5e36902a51d57b6c431c.zip sdk-26a409b48dd80d94b8aa5e36902a51d57b6c431c.tar.gz sdk-26a409b48dd80d94b8aa5e36902a51d57b6c431c.tar.bz2 |
Guard against a possible NPE when the rendering fails.
Change-Id: I8b0a0c65f2b0d7b7faf10224ac2945081605c5c4
Diffstat (limited to 'ide_common')
-rw-r--r-- | ide_common/src/com/android/ide/common/rendering/LayoutLibrary.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ide_common/src/com/android/ide/common/rendering/LayoutLibrary.java b/ide_common/src/com/android/ide/common/rendering/LayoutLibrary.java index 0d6e5e3..5500279 100644 --- a/ide_common/src/com/android/ide/common/rendering/LayoutLibrary.java +++ b/ide_common/src/com/android/ide/common/rendering/LayoutLibrary.java @@ -328,8 +328,10 @@ public class LayoutLibrary { // Extended view info was requested but the layoutlib does not support it. // Add it manually. List<ViewInfo> infoList = session.getRootViews(); - for (ViewInfo info : infoList) { - addExtendedViewInfo(info); + if (infoList != null) { + for (ViewInfo info : infoList) { + addExtendedViewInfo(info); + } } } |