sc/source/core/opencl/formulagroupcl.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 5b2e43c1cd2f3dbb3ac498526f2d4f681f22576b
Author: Tor Lillqvist <t...@collabora.com>
Date:   Tue Feb 10 20:04:01 2015 +0200

    Don't call clReleaseProgram() on the same program twice
    
    If the clBuildProgram() failed, the lastSecondProgram variable kept as its
    value the already released program handle, and later we called
    clReleaseProgram() on it again. This is certainly wrong, and caused a crash 
at
    least with my OpenCL implementation.
    
    As such I am not sure if that lastOneProgram, lastSecondProgram etc dance is
    sane...
    
    Change-Id: Ia4b9f0df52bd7dd15efa914a0795fcf251c65969
    Reviewed-on: https://gerrit.libreoffice.org/14409
    Reviewed-by: Eike Rathke <er...@redhat.com>
    Reviewed-by: Jan Holesovsky <ke...@collabora.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sc/source/core/opencl/formulagroupcl.cxx 
b/sc/source/core/opencl/formulagroupcl.cxx
index afc19d4..96d3dc1 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -3802,6 +3802,7 @@ void DynamicKernel::CreateKernel()
         if (lastSecondProgram)
         {
             clReleaseProgram(lastSecondProgram);
+            lastSecondProgram = NULL;
         }
         if (::opencl::buildProgramFromBinary("",
                 &::opencl::gpuEnv, KernelHash.c_str(), 0))
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to