am 67640c0c: Workaround for crashing on rotation. (Bug 6611883)
* commit '67640c0cbe27e6c83b69070d23ea50c4a6f18447':
Workaround for crashing on rotation. (Bug 6611883)
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 9cae5e5..105d943 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -704,7 +704,8 @@
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);