Fix null pointer with no location