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

Commit 22bca30e authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "gui: explicitly crash in Surface's ctor if bufferProducer is null" into main

parents fbe8d081 414972ff
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -116,6 +116,8 @@ Surface::Surface(const sp<IGraphicBufferProducer>& bufferProducer, bool controll
        mFrameTimestampsSupportsPresent(false),
        mEnableFrameTimestamps(false),
        mFrameEventHistory(std::make_unique<ProducerFrameEventHistory>()) {
    LOG_ALWAYS_FATAL_IF(!mGraphicBufferProducer); // it will crash anyway

    // Initialize the ANativeWindow function pointers.
    ANativeWindow::setSwapInterval  = hook_setSwapInterval;
    ANativeWindow::dequeueBuffer    = hook_dequeueBuffer;