am 533e2728: Don\'t crash in onDestroy. Not all ApplicationInfos have their icons loaded.
Merge commit '533e2728352fc55a14e4f1b689a916cbd7a58f12'
* commit '533e2728352fc55a14e4f1b689a916cbd7a58f12':
Don't crash in onDestroy. Not all ApplicationInfos have their icons loaded.
diff --git a/src/com/android/launcher2/AppInfoCache.java b/src/com/android/launcher2/AppInfoCache.java
index 65ae570..f89e3ab 100644
--- a/src/com/android/launcher2/AppInfoCache.java
+++ b/src/com/android/launcher2/AppInfoCache.java
@@ -148,7 +148,9 @@
public static void unbindDrawables() {
synchronized (sCache) {
for (ApplicationInfo appInfo: sCache.values()) {
- appInfo.icon.setCallback(null);
+ if (appInfo.icon != null) {
+ appInfo.icon.setCallback(null);
+ }
}
}
}