backends/x11: Fix a crash in KWin::X11WindowedEglPrimaryLayer::present()
CompositorWayland will call the present() function even if the beginFrame() fails, in which case, m_buffer can be null. Also, the present function has no code to reset m_buffer after it has finished using it.
SENTRY: KWIN-6JD
(cherry picked from commit 1573657c)
Co-authored-by: Vlad Zahorodnii vlad.zahorodnii@kde.org