cvGetReal2D + opticalFlow

Hi everybody !!

I trying to get the xVel and yVel using opticalFlow, but I get an error on this line on my loop (first iteration) :

  
float xVel = cvGetReal2D( opticalFlow.vel_x, pY, pX);  

pY and pX are on the range of my camera input (i have checked the values …)

but i get this error :
process returned -1073741819

The error must be caused by “opticalFlow.vel_x”, how can i trace it on my loop ?

any ideas ???

Thanks you so much !