fix #7158, crash in code_native when filename is missing.