Assignment to a pointer is non-atomic.
Reading the pointer (in both, the if and the return) might get
"half" of the update, resulting in an invalid pointer being used.
Merge pull request #1 from dhoepfl/NonAtomic

Assignment to a pointer is non-atomic.