diff --git a/src/platformsupport/scenes/opengl/eglswapchain.cpp b/src/platformsupport/scenes/opengl/eglswapchain.cpp index 1f1d499a2e..5db6db24a6 100644 --- a/src/platformsupport/scenes/opengl/eglswapchain.cpp +++ b/src/platformsupport/scenes/opengl/eglswapchain.cpp @@ -24,7 +24,9 @@ EglSwapchainSlot::EglSwapchainSlot(EglContext *context, GraphicsBuffer *buffer) : m_buffer(buffer) { m_texture = context->importDmaBufAsTexture(*buffer->dmabufAttributes()); - m_framebuffer = std::make_unique(m_texture.get()); + if (m_texture) { + m_framebuffer = std::make_unique(m_texture.get()); + } } EglSwapchainSlot::~EglSwapchainSlot() @@ -137,7 +139,7 @@ std::shared_ptr EglSwapchain::create(GraphicsBufferAllocator *allo } const QVector> slots{std::make_shared(context, seed)}; - if (!slots.front()->framebuffer()->valid()) { + if (!slots.front()->framebuffer() || !slots.front()->framebuffer()->valid()) { return nullptr; } return std::make_shared(std::move(allocator),