diff options
author | Tor Lillqvist <tml@collabora.com> | 2015-02-10 20:04:01 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2015-02-10 20:29:42 +0200 |
commit | 127b0efe6fee1620647a2e249cbae9b8f13ee0cd (patch) | |
tree | 01909fe249a18e93ed9915c2af7fe63747ab4a2c /sc | |
parent | 770c92b048df2259df1b7ce2a47f9903fc8be387 (diff) |
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: Ia30426fbba9118ad7e20f13ef35daa5f78a1f0a1
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/opencl/formulagroupcl.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx index a70c0f72ab0c..6f42d2c42469 100644 --- a/sc/source/core/opencl/formulagroupcl.cxx +++ b/sc/source/core/opencl/formulagroupcl.cxx @@ -3837,6 +3837,7 @@ void DynamicKernel::CreateKernel() SAL_INFO("sc.opencl", "Releasing program " << lastSecondProgram); err = clReleaseProgram(lastSecondProgram); SAL_WARN_IF(err != CL_SUCCESS, "sc.opencl", "clReleaseProgram failed: " << ::opencl::errorString(err)); + lastSecondProgram = NULL; } if (::opencl::buildProgramFromBinary("", &::opencl::gpuEnv, KernelHash.c_str(), 0)) |