Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6cef92b4 authored by Santos Cordon's avatar Santos Cordon
Browse files

Add a missing null check.

Change-Id: I48d77d126e9afcaf652aa83ebecd8555e7d6c642
parent f7683a6f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -156,7 +156,7 @@ class CompatibilityDisplay {

            mVirtualDisplay = mDisplayManager.createVirtualDisplay("VR 2D Display", WIDTH, HEIGHT,
                    DPI, null /* Surface */, 0 /* flags */);
            if (mSurface != null && mSurface.isValid()) {
            if (mVirtualDisplay != null && mSurface != null && mSurface.isValid()) {
              // TODO: Need to protect all setSurface calls with a lock.
              mVirtualDisplay.setSurface(mSurface);
            }