64bits openCV error convertToGrayscalePlanarImages

Hey! i have an issue with openCV in iOS already try the 8.4 branch and the new one in OSX is working ok.
I think is the convertToGrayscalePlanarImages function.
is just this code.

photoCV.convertToGrayscalePlanarImages(r, g, b);

r.brightnessContrast(brillo, contraste);
g.brightnessContrast(brillo, contraste);
b.brightnessContrast(brillo, contraste);

photoCV.setFromGrayscalePlanarImages(r, g, b);

This is the error:
OpenCV Error: Null pointer (Null pointer to image) in cvGetImageROI, file /Users/danielrosser/Documents/openFrameworks/scripts/apothecary/build/OpenCV/modules/core/src/array.cpp, line 3057
libc++abi.dylib: terminating with uncaught exception of type cv::Exception: /Users/danielrosser/Documents/openFrameworks/scripts/apothecary/build/OpenCV/modules/core/src/array.cpp:3057: error: (-27) Null pointer to image in function cvGetImageROI

any idea?

Nevermind! forgot to allocated the images.