mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 00:03:03 +04:00
Fix a potential bug of ocl::CannyBuf.
The program would crash if release is called twice.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user