From 292c025d06b41c42546e9771b0da0333e08f9db7 Mon Sep 17 00:00:00 2001 From: Adam Cohen Date: Mon, 18 Jul 2011 13:55:17 -0700 Subject: Fix bug 4904696, null pointer exception for widget that's not found Change-Id: I3af50808e312cbe5f8e62a3b17e3e8c1f7d9e3e0 --- src/com/android/launcher2/Launcher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java index 489f3fbb8..803760a35 100644 --- a/src/com/android/launcher2/Launcher.java +++ b/src/com/android/launcher2/Launcher.java @@ -1217,7 +1217,7 @@ public final class Launcher extends Activity }; void addWidgetToAutoAdvanceIfNeeded(View hostView, AppWidgetProviderInfo appWidgetInfo) { - if (appWidgetInfo.autoAdvanceViewId == -1) return; + if (appWidgetInfo == null || appWidgetInfo.autoAdvanceViewId == -1) return; View v = hostView.findViewById(appWidgetInfo.autoAdvanceViewId); if (v instanceof Advanceable) { mWidgetsToAdvance.put(hostView, appWidgetInfo); -- cgit v1.2.3