Initialize ptr to null for old grumpy compilers