mirror of
https://github.com/opencv/opencv.git
synced 2024-11-26 04:00:30 +08:00
Fix a potential bug of ocl::CannyBuf.
The program would crash if release is called twice.
This commit is contained in:
parent
7586145235
commit
4f328d8388
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user