From a3f56669f704ff31a804d93dbfe8dbf5fba29e15 Mon Sep 17 00:00:00 2001 From: Barry <870709864@qq.com> Date: Sat, 26 Jan 2019 22:10:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:opengl=E6=9C=AA=E6=89=A7=E8=A1=8C=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8B=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E6=B8=85=E7=90=86=E4=BC=9A=E8=A7=A6=E5=8F=91assert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- QtScrcpy/render/qyuvopenglwidget.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/QtScrcpy/render/qyuvopenglwidget.cpp b/QtScrcpy/render/qyuvopenglwidget.cpp index 02c1c2e..33c8788 100644 --- a/QtScrcpy/render/qyuvopenglwidget.cpp +++ b/QtScrcpy/render/qyuvopenglwidget.cpp @@ -221,7 +221,10 @@ void QYUVOpenGLWidget::initTextures() void QYUVOpenGLWidget::deInitTextures() { - glDeleteTextures(3, m_texture); + if (QOpenGLFunctions::isInitialized(QOpenGLFunctions::d_ptr)) { + glDeleteTextures(3, m_texture); + } + memset(m_texture, 0, 3); m_textureInited = false; }