Error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize' occur when runs code on Windows but works fine on Mac

I no longer had Windows to try any but I just want to know why this occur

(the code is written on my mac, I just want to run it on the other computer)