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);
+ }
}
}
}