Fix a potential bug of ocl::CannyBuf.

The program would crash if release is called twice.
This commit is contained in:
peng xiao 2013-04-12 15:43:33 +08:00
parent 7586145235
commit 4f328d8388

View File

@ -112,7 +112,11 @@ void cv::ocl::CannyBuf::release()
mapBuf.release();
trackBuf1.release();
trackBuf2.release();
openCLFree(counter);
if(counter)
{
openCLFree(counter);
counter = NULL;
}
}
namespace cv