Fix #5891 (the simpler version).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@38126 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Pavel Sanda 2011-03-29 11:57:44 +00:00
parent d4188a5e7f
commit 458cf0c513
2 changed files with 5 additions and 1 deletions

View File

@ -557,7 +557,10 @@ unsigned long FileName::checksum() const
return result;
struct stat info;
fstat(fd, &info);
if (fstat(fd, &info)) {
close(fd);
return result;
}
void * mm = mmap(0, info.st_size, PROT_READ,
MAP_PRIVATE, fd, 0);

View File

@ -77,6 +77,7 @@ What's new
- Issue a warning when an included file could not be loaded (bug 7343).
- Fix freezing of LyX at samba shares (bug 5891).
* DOCUMENTATION AND LOCALIZATION