summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index 4fee772cd6..e1e2ec5d24 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -653,17 +653,19 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra
}
}
- qCDebug(QT_XCB_GLINTEGRATION) << "Choosing xcb gl-integration based on following priority\n" << glIntegrationNames;
- for (int i = 0; i < glIntegrationNames.size() && !m_glIntegration; i++) {
- m_glIntegration = QXcbGlIntegrationFactory::create(glIntegrationNames.at(i));
- if (m_glIntegration && !m_glIntegration->initialize(this)) {
- qCDebug(QT_XCB_GLINTEGRATION) << "Failed to initialize xcb gl-integration" << glIntegrationNames.at(i);
- delete m_glIntegration;
- m_glIntegration = Q_NULLPTR;
+ if (!glIntegrationNames.isEmpty()) {
+ qCDebug(QT_XCB_GLINTEGRATION) << "Choosing xcb gl-integration based on following priority\n" << glIntegrationNames;
+ for (int i = 0; i < glIntegrationNames.size() && !m_glIntegration; i++) {
+ m_glIntegration = QXcbGlIntegrationFactory::create(glIntegrationNames.at(i));
+ if (m_glIntegration && !m_glIntegration->initialize(this)) {
+ qCDebug(QT_XCB_GLINTEGRATION) << "Failed to initialize xcb gl-integration" << glIntegrationNames.at(i);
+ delete m_glIntegration;
+ m_glIntegration = Q_NULLPTR;
+ }
}
+ if (!m_glIntegration)
+ qCDebug(QT_XCB_GLINTEGRATION) << "Failed to create xcb gl-integration";
}
- if (!m_glIntegration)
- qCDebug(QT_XCB_GLINTEGRATION) << "Failed to create xcb gl-integration";
sync();
}