NullPointer Exception

How would you handle a null pointer exception in arduino? Pls help!!!

I don't think the AVR controllers support any kind of exception handling. When the null pointer is dereferenced, it simply accesses memory location 0 in my experience.

I think the trick is to make sure, programmatically, that you never get to the point of recieving a null pointer.

The Arduino processor has no exception handling mechanism. It has no protected mode, no privileged instructions, and no operating system. The only way to detect a NULL pointer is to explicitly code a test like this:

if (p == NULL) {
// handle NULL pointer here