ocl: fix FFT initialization
authorAlexander Alekhin <alexander.alekhin@itseez.com>
Mon, 21 Oct 2013 15:48:36 +0000 (19:48 +0400)
committerAlexander Alekhin <alexander.alekhin@itseez.com>
Mon, 21 Oct 2013 15:48:36 +0000 (19:48 +0400)
modules/ocl/src/fft.cpp

index 6e4fc4d..50880f9 100644 (file)
@@ -126,7 +126,8 @@ void cv::ocl::fft_setup()
     {
         return;
     }
-    pCache.setupData = new clAmdFftSetupData;
+    if (pCache.setupData == NULL)
+        pCache.setupData = new clAmdFftSetupData;
     openCLSafeCall(clAmdFftInitSetupData( pCache.setupData ));
     pCache.started = true;
 }