initialize pointer with NULL; dereference pointer to pointer before chec...

...king for NULL