From 3bf97e87e5adc79cf5a798bf23dec1e195803118 Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Thu, 6 Jun 2024 16:51:22 +0200 Subject: [PATCH] backends/x11/standalone: add a nullptr check in the vblank handler It can be called without a previous presentation in some cases BUG: 488112 --- src/backends/x11/standalone/x11_standalone_glx_backend.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/backends/x11/standalone/x11_standalone_glx_backend.cpp b/src/backends/x11/standalone/x11_standalone_glx_backend.cpp index f8c209d47d..6f4f6b185d 100644 --- a/src/backends/x11/standalone/x11_standalone_glx_backend.cpp +++ b/src/backends/x11/standalone/x11_standalone_glx_backend.cpp @@ -714,8 +714,10 @@ void GlxBackend::present(Output *output, const std::shared_ptr &fra void GlxBackend::vblank(std::chrono::nanoseconds timestamp) { - m_frame->presented(timestamp, PresentationMode::VSync); - m_frame.reset(); + if (m_frame) { + m_frame->presented(timestamp, PresentationMode::VSync); + m_frame.reset(); + } } bool GlxBackend::makeCurrent()