GlobalTime: Perform Zoom In and Out only after initialization
Invoking zoom on mGLView before initialization causes Null pointer exception. The usecase is to launch global time and immediately press key 2 or 8 (just before the globe is seen on display). Change-Id: I10e7736527a934029364c9c83f147f94574f5488
This commit is contained in:
@@ -898,7 +898,7 @@ class GTView extends SurfaceView implements SurfaceHolder.Callback {
|
|||||||
|
|
||||||
// The '2' key zooms out
|
// The '2' key zooms out
|
||||||
case KeyEvent.KEYCODE_2:
|
case KeyEvent.KEYCODE_2:
|
||||||
if (!mAlphaKeySet && !mDisplayWorldFlat) {
|
if (!mAlphaKeySet && !mDisplayWorldFlat && mInitialized) {
|
||||||
mGLView.zoom(-2);
|
mGLView.zoom(-2);
|
||||||
handled = true;
|
handled = true;
|
||||||
}
|
}
|
||||||
@@ -906,7 +906,7 @@ class GTView extends SurfaceView implements SurfaceHolder.Callback {
|
|||||||
|
|
||||||
// The '8' key zooms in
|
// The '8' key zooms in
|
||||||
case KeyEvent.KEYCODE_8:
|
case KeyEvent.KEYCODE_8:
|
||||||
if (!mAlphaKeySet && !mDisplayWorldFlat) {
|
if (!mAlphaKeySet && !mDisplayWorldFlat && mInitialized) {
|
||||||
mGLView.zoom(2);
|
mGLView.zoom(2);
|
||||||
handled = true;
|
handled = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user