PinChangeInt library- To attach interrupts to multiple Arduino (Uno/Mega) pins

The test for p == NULL should be directly after PCintPin* p=new PCintPin;
as one cannot access the members of p when p == NULL

Fixed. Nice catch, thanks!
-GreyGnome