From 533e2728352fc55a14e4f1b689a916cbd7a58f12 Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Tue, 22 Sep 2009 17:31:51 -0700 Subject: [PATCH] Don't crash in onDestroy. Not all ApplicationInfos have their icons loaded. --- src/com/android/launcher2/AppInfoCache.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher2/AppInfoCache.java b/src/com/android/launcher2/AppInfoCache.java index 65ae570222..f89e3abfbf 100644 --- a/src/com/android/launcher2/AppInfoCache.java +++ b/src/com/android/launcher2/AppInfoCache.java @@ -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); + } } } }