From 1a5b3b4bea43756d97dbf4d4200a7a004bcc4783 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B6glund?= Date: Wed, 19 Jan 2011 16:40:37 +0000 Subject: [PATCH] Disable and delete the fragment program if it fails to compile. svn path=/branches/KDE/4.6/kdebase/workspace/; revision=1215777 --- lanczosfilter.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lanczosfilter.cpp b/lanczosfilter.cpp index 1b6695ac81..f92e529859 100644 --- a/lanczosfilter.cpp +++ b/lanczosfilter.cpp @@ -708,6 +708,10 @@ bool LanczosShader::init() { const char *error = (const char*)glGetString(GL_PROGRAM_ERROR_STRING_ARB); kError() << "Failed to compile fragment program:" << error; + glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, 0); + glDeleteProgramsARB(1, &m_arbProgram); + glDisable(GL_FRAGMENT_PROGRAM_ARB); + m_arbProgram = 0; return false; }