summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/Launcher.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher2/Launcher.java')
-rw-r--r--src/com/android/launcher2/Launcher.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 9cae5e596..105d9436b 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -704,7 +704,8 @@ public final class Launcher extends Activity
AppWidgetProviderInfo pInfo = lahv.getAppWidgetInfo();
// Remove the current widget which is inflated with the wrong orientation
- getWorkspace().getParentCellLayoutForView(lahv).removeView(lahv);
+ CellLayout cl = getWorkspace().getParentCellLayoutForView(lahv);
+ if (cl != null) cl.removeView(lahv);
// Re-inflate the widget using the correct orientation
AppWidgetHostView widget = mAppWidgetHost.createView(this, info.appWidgetId, pInfo);