Not all memory bugs result in writing to a null pointer.
For example, you can do a double free, or write to a pointer that was freed.