Fix crash in getCurrentWorkspaceScreen.

Bug 2761789

Change-Id: I9f005c876ca20f774e6d8046e34451a7fecbe805
This commit is contained in:
Joe Onorato 2010-06-11 00:03:15 -07:00
parent a9bda02f7c
commit d0afc87d96
1 changed files with 5 additions and 1 deletions

View File

@ -2093,7 +2093,11 @@ public final class Launcher extends Activity
* Implementation of the method from LauncherModel.Callbacks.
*/
public int getCurrentWorkspaceScreen() {
return mWorkspace.getCurrentScreen();
if (mWorkspace != null) {
return mWorkspace.getCurrentScreen();
} else {
return SCREEN_COUNT / 2;
}
}
/**