summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher2')
-rw-r--r--src/com/android/launcher2/DragLayer.java20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/com/android/launcher2/DragLayer.java b/src/com/android/launcher2/DragLayer.java
index 2e72f6223..eb539450f 100644
--- a/src/com/android/launcher2/DragLayer.java
+++ b/src/com/android/launcher2/DragLayer.java
@@ -62,17 +62,19 @@ public class DragLayer extends FrameLayout {
// event has occurred which doesn't result in resizing a widget. In this case, we
// dismiss any visible resize frames.
final Workspace w = (Workspace) findViewById(R.id.workspace);
- final CellLayout currentPage = (CellLayout) w.getChildAt(w.getCurrentPage());
- final CellLayoutChildren childrenLayout = currentPage.getChildrenLayout();
+ if (w != null) {
+ final CellLayout currentPage = (CellLayout) w.getChildAt(w.getCurrentPage());
+ final CellLayoutChildren childrenLayout = currentPage.getChildrenLayout();
- if (childrenLayout.hasResizeFrames() && !childrenLayout.isWidgetBeingResized()) {
- post(new Runnable() {
- public void run() {
- if (!childrenLayout.isWidgetBeingResized()) {
- childrenLayout.clearAllResizeFrames();
+ if (childrenLayout.hasResizeFrames() && !childrenLayout.isWidgetBeingResized()) {
+ post(new Runnable() {
+ public void run() {
+ if (!childrenLayout.isWidgetBeingResized()) {
+ childrenLayout.clearAllResizeFrames();
+ }
}
- }
- });
+ });
+ }
}
return mDragController.onInterceptTouchEvent(ev);
}