[vlc-commits] qt: fix Direct Composition Qml OpenGL context not created in release mode
Pierre Lamot
git at videolan.org
Thu Sep 10 16:10:19 CEST 2020
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Thu Sep 10 15:59:38 2020 +0200| [e8f751aea738d0777baaf3ca3dd798920fb80457] | committer: Pierre Lamot
qt: fix Direct Composition Qml OpenGL context not created in release mode
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e8f751aea738d0777baaf3ca3dd798920fb80457
---
modules/gui/qt/maininterface/compositor_dcomp_uisurface.cpp | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/modules/gui/qt/maininterface/compositor_dcomp_uisurface.cpp b/modules/gui/qt/maininterface/compositor_dcomp_uisurface.cpp
index 599d4b2fc3..74f90fbdff 100644
--- a/modules/gui/qt/maininterface/compositor_dcomp_uisurface.cpp
+++ b/modules/gui/qt/maininterface/compositor_dcomp_uisurface.cpp
@@ -163,8 +163,12 @@ bool CompositorDCompositionUISurface::init()
m_context = new QOpenGLContext(this);
m_context->setScreen(m_rootWindow->screen());
m_context->setFormat(format);
- assert(m_context->create());
- assert(m_context->isValid());
+ ret = m_context->create();
+ if (!ret || !m_context->isValid())
+ {
+ msg_Err(m_intf, "unable to create QML OpenGL context");
+ return false;
+ }
QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface();
m_eglDisplay = static_cast<EGLDisplay>(nativeInterface->nativeResourceForContext("eglDisplay", m_context));
More information about the vlc-commits
mailing list