Don't crash Photo Sphere on back button press in filmstrip.

  Bug: 11554580

Change-Id: I983713eecbd6f13bd90f94b24a0fa1ecc26e1c56
diff --git a/src/com/android/camera/SurfaceTextureRenderer.java b/src/com/android/camera/SurfaceTextureRenderer.java
index 66f7aa2..3315043 100644
--- a/src/com/android/camera/SurfaceTextureRenderer.java
+++ b/src/com/android/camera/SurfaceTextureRenderer.java
@@ -51,8 +51,10 @@
         @Override
         public void run() {
             synchronized (mRenderLock) {
-                mFrameDrawer.onDrawFrame(mGl);
-                mEgl.eglSwapBuffers(mEglDisplay, mEglSurface);
+                if (mEglDisplay != null && mEglSurface != null) {
+                    mFrameDrawer.onDrawFrame(mGl);
+                    mEgl.eglSwapBuffers(mEglDisplay, mEglSurface);
+                }
                 mRenderLock.notifyAll();
             }
         }