From: Angus Leeming Date: Mon, 25 Mar 2002 16:15:46 +0000 (+0000) Subject: Herbert's patch to stop LyX from hanging if the graphics file does not exist. X-Git-Tag: 1.6.10~19575 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=ab53dc5d7bf0bcc6e91bb5629c3090294d38a486;p=features.git Herbert's patch to stop LyX from hanging if the graphics file does not exist. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3826 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index ef7a08ebd5..7cbf3cfad2 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,8 @@ +2002-03-25 Herbert Voss + + * insetgraphicsParams.C (Read): prevent LyX from hanging if the + graphics file does not exist. + 2002-03-25 Angus Leeming * insetgraphics.C (prepareFile): ensure that the file has an absolute diff --git a/src/insets/insetgraphicsParams.C b/src/insets/insetgraphicsParams.C index e4e77d960c..b1bfec7975 100644 --- a/src/insets/insetgraphicsParams.C +++ b/src/insets/insetgraphicsParams.C @@ -251,8 +251,11 @@ bool InsetGraphicsParams::Read(LyXLex & lex, string const& token) draft = true; } else if (token == "display") { lex.next(); - string const type = lex.getString(); - display = displayTranslator.find(type); + if (IsFileReadable(filename)) { + string const type = lex.getString(); + display = displayTranslator.find(type); + } else + display = NONE; } else if (token == "subcaption") { subcaption = true; } else if (token == "subcaptionText") {