summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/gl_integrations/qxcbnativeinterfacehandler.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-02-02 14:34:37 +0100
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-02-05 10:01:09 +0000
commite8ef23eee4bdc6df293aeda873cb46760a49968c (patch)
tree1529e2aa798880529e0bf484dc775f92ed728bc7 /src/plugins/platforms/xcb/gl_integrations/qxcbnativeinterfacehandler.cpp
parentc56da2e8dac67bbed78f5f0504e7df042018122b (diff)
xcb: do not leak window system integration
Destroy the GLX or EGL backend. This also requires fixing an uninitalized member in the native interfaace handler. Besides fixing the leak this will also do eglTerminate on exit, which is very beneficial for proper resource cleanup and avoids "Display is destroyed with resources" warnings on Mesa with debugging enabled. Change-Id: Ibd62d6964e86ac1319abed1f06b478327c348a0e Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/xcb/gl_integrations/qxcbnativeinterfacehandler.cpp')
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/qxcbnativeinterfacehandler.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/gl_integrations/qxcbnativeinterfacehandler.cpp b/src/plugins/platforms/xcb/gl_integrations/qxcbnativeinterfacehandler.cpp
index 78c6fe0ccb..b060c8649d 100644
--- a/src/plugins/platforms/xcb/gl_integrations/qxcbnativeinterfacehandler.cpp
+++ b/src/plugins/platforms/xcb/gl_integrations/qxcbnativeinterfacehandler.cpp
@@ -46,8 +46,9 @@
QT_BEGIN_NAMESPACE
QXcbNativeInterfaceHandler::QXcbNativeInterfaceHandler(QXcbNativeInterface *nativeInterface)
+ : m_native_interface(nativeInterface)
{
- nativeInterface->addHandler(this);
+ m_native_interface->addHandler(this);
}
QXcbNativeInterfaceHandler::~QXcbNativeInterfaceHandler()
{