cleanups = make_cleanup (xfree, filename);
res = stat (filename, &st);
- if (exec_bfd_mtime && exec_bfd_mtime != st.st_mtime)
+ if (res == 0 && exec_bfd_mtime && exec_bfd_mtime != st.st_mtime)
exec_file_attach (filename, 0);
else
/* If we accessed the file since last opening it, close it now;