Use RaiseException and raise directly rather than trying to dereference a NULL pointer to abort.