From 56e79aa87da99172896844d891102193f323fc5c Mon Sep 17 00:00:00 2001 From: skidau Date: Sun, 24 Oct 2010 04:17:36 +0000 Subject: Added a safer OpenCL shutdown procedure. Fixes issue 3015. Fixes issue 3089. Fixes issue 3099. Fixes issue 3360. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6307 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/VideoCommon/Src/OpenCL/OCLTextureDecoder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/VideoCommon/Src/OpenCL/OCLTextureDecoder.cpp') diff --git a/Source/Core/VideoCommon/Src/OpenCL/OCLTextureDecoder.cpp b/Source/Core/VideoCommon/Src/OpenCL/OCLTextureDecoder.cpp index 3a93a27ea6..38ee283433 100644 --- a/Source/Core/VideoCommon/Src/OpenCL/OCLTextureDecoder.cpp +++ b/Source/Core/VideoCommon/Src/OpenCL/OCLTextureDecoder.cpp @@ -127,8 +127,8 @@ void TexDecoder_OpenCL_Initialize() void TexDecoder_OpenCL_Shutdown() { #if defined(HAVE_OPENCL) && HAVE_OPENCL && !defined(DEBUG_OPENCL) - - clReleaseProgram(g_program); + if (g_program) + clReleaseProgram(g_program); for (int i = 0; i < GX_TF_CMPR; ++i) { if (g_DecodeParametersNative[i].kernel) -- cgit v1.2.3