Passing a nullptr to data in the Mat Constructor

Hi, I was recently asked by someone if I need to implement an error handling capability in my wrapper class for Mat in cases where a nullptr in being passed instead of the address to a pre-allocated memory location for the data. What does OpenCV do in such cases ?

what exactly do you have in mind ?
there is a check for NULL in place already, but if it triggers, you’ll have to catch a cv::Exception

Hi, thank you for the reply. Just wanted to know if there was a check in place already or OpenCV would just store the NULL without exception.