This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:

Subject: qv4l2: fix crash when disabling openGL
Author:  Hans Verkuil <hverkuil-ci...@xs4all.nl>
Date:    Mon Jul 22 11:28:58 2024 +0200

Start qv4l2, then disable "Use OpenGL Rendering", and qv4l2
crashes. Fix this.

Signed-off-by: Hans Verkuil <hverkuil-ci...@xs4all.nl>
(cherry picked from commit e268a722986615b69a6cb99ab37bd5f50e42957d)
Signed-off-by: Gregor Jasny <gja...@googlemail.com>

 utils/qv4l2/capture-win-gl.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=72ae09dbaa801c43e54c659c1fb638d5aa8cc4be
diff --git a/utils/qv4l2/capture-win-gl.cpp b/utils/qv4l2/capture-win-gl.cpp
index 7e993e3be2a0..9fe9eea6043a 100644
--- a/utils/qv4l2/capture-win-gl.cpp
+++ b/utils/qv4l2/capture-win-gl.cpp
@@ -270,7 +270,8 @@ void CaptureWinGLEngine::setLinearFilter(bool enable)
 
 void CaptureWinGLEngine::clearShader()
 {
-       glDeleteTextures(m_screenTextureCount, m_screenTexture);
+       if (m_screenTextureCount)
+               glDeleteTextures(m_screenTextureCount, m_screenTexture);
        if (m_shaderProgram.isLinked()) {
                m_shaderProgram.release();
                m_shaderProgram.removeAllShaders();

Reply via email to