mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 01:16:49 +00:00
Fix crash in getCurrentWorkspaceScreen.
Bug 2761789 Change-Id: I9f005c876ca20f774e6d8046e34451a7fecbe805
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user