Fix a potential bug of ocl::CannyBuf.

The program would crash if release is called twice.
pull/805/head
peng xiao 12 years ago
parent 7586145235
commit 4f328d8388
  1. 6
      modules/ocl/src/canny.cpp

@ -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…
Cancel
Save