backends/x11: Avoid calling doneCurrent() if GLX context has not been created

BUG: 477854
wilder/Plasma/6.2
Vlad Zahorodnii 2 years ago
parent bb354de90e
commit ff4cfe279a
  1. 13
      src/backends/x11/standalone/x11_standalone_glx_backend.cpp

@ -154,12 +154,15 @@ GlxBackend::~GlxBackend()
if (isFailed()) {
m_overlayWindow->destroy();
}
// TODO: cleanup in error case
// do cleanup after initBuffer()
cleanupGL();
doneCurrent();
m_context.reset();
if (m_context) {
// TODO: cleanup in error case
// do cleanup after initBuffer()
cleanupGL();
doneCurrent();
m_context.reset();
}
if (glxWindow) {
glXDestroyWindow(display(), glxWindow);

Loading…
Cancel
Save