Fix null pointer when looking up source