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

Commit 25c37616 authored by Todd Lee's avatar Todd Lee
Browse files

Ensure surface control is valid before trying BBQ update

Bug: b/365509273
Test: treehugger
Flag: NONE exempt narrow scope/added protection
Change-Id: I1a43e3b2001447fa7e49c240d112ec0b7205226b
parent 21a1d068
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -2397,7 +2397,11 @@ public abstract class WallpaperService extends Service {
                // it hasn't changed and there is no need to update.
                ret = mBlastBufferQueue.createSurface();
            } else {
                if (mBbqSurfaceControl != null && mBbqSurfaceControl.isValid()) {
                    mBlastBufferQueue.update(mBbqSurfaceControl, width, height, format);
                } else {
                    Log.w(TAG, "Skipping BlastBufferQueue update - invalid surface control");
                }
            }

            return ret;