Don't crash in onDestroy. Not all ApplicationInfos have their icons loaded.

This commit is contained in:
Joe Onorato
2009-09-22 17:31:51 -07:00
parent bea627791d
commit 533e272835

View File

@@ -148,7 +148,9 @@ public class AppInfoCache {
public static void unbindDrawables() {
synchronized (sCache) {
for (ApplicationInfo appInfo: sCache.values()) {
appInfo.icon.setCallback(null);
if (appInfo.icon != null) {
appInfo.icon.setCallback(null);
}
}
}
}