76860c72e1
It's the region pointer that can be NULL here, and p was checked at the beginning of the function. Also fix the test accordingly.