summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2011-01-16 16:57:05 -0800
committerMichael Jurka <mikejurka@google.com>2011-01-16 16:57:05 -0800
commitc31820d29cd51a1f46f8ccf9f301a3e7c36d3af2 (patch)
treeebcc6435ef26cc063a6282af2688a9f5854cf246 /src
parent1619ccfce4d7117144db27e5e08ef3a3d4b339a7 (diff)
downloadandroid_packages_apps_Trebuchet-c31820d29cd51a1f46f8ccf9f301a3e7c36d3af2.tar.gz
android_packages_apps_Trebuchet-c31820d29cd51a1f46f8ccf9f301a3e7c36d3af2.tar.bz2
android_packages_apps_Trebuchet-c31820d29cd51a1f46f8ccf9f301a3e7c36d3af2.zip
NPE fix
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher2/AllAppsPagedView.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/launcher2/AllAppsPagedView.java b/src/com/android/launcher2/AllAppsPagedView.java
index c9c069f12..a15b73b18 100644
--- a/src/com/android/launcher2/AllAppsPagedView.java
+++ b/src/com/android/launcher2/AllAppsPagedView.java
@@ -221,11 +221,13 @@ public class AllAppsPagedView extends PagedViewWithDraggableItems implements All
public void run() {
DeleteZone allAppsDeleteZone =
(DeleteZone) mLauncher.findViewById(R.id.all_apps_delete_zone);
- allAppsDeleteZone.setDragAndDropEnabled(false);
+ // if onDestroy was called on Launcher, we might have already deleted the
+ // all apps delete zone / info button, so check if they are null
+ if (allAppsDeleteZone != null) allAppsDeleteZone.setDragAndDropEnabled(false);
ApplicationInfoDropTarget allAppsInfoButton =
(ApplicationInfoDropTarget) mLauncher.findViewById(R.id.all_apps_info_target);
- allAppsInfoButton.setDragAndDropEnabled(false);
+ if (allAppsInfoButton != null) allAppsInfoButton.setDragAndDropEnabled(false);
}
});
resetCheckedGrandchildren();