In C ++, dereferencing a NULL pointer causes undefined behavior , which means that everything can happen: a computer can explode, a function can return an arbitrary value, a program can be killed by an exception of the operating system (which, unlike a C ++ expression, cannot be detected by try-catch).
In short, does not do this .
(, , ), (, SEH Windows).