Fixed #4786 (segfault with one LibreOffice file)