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") {