diff --git a/fbreader/fbreader/fbreader/src/formats/xhtml/XHTMLReader.cpp b/fbreader/fbreader/fbreader/src/formats/xhtml/XHTMLReader.cpp index e9144f0..7006ee5 100644 --- a/fbreader/fbreader/fbreader/src/formats/xhtml/XHTMLReader.cpp +++ b/fbreader/fbreader/fbreader/src/formats/xhtml/XHTMLReader.cpp @@ -283,7 +283,8 @@ XHTMLTagImageAction::XHTMLTagImageAction(const std::string &attributeName) { void XHTMLTagImageAction::doAtStart(XHTMLReader &reader, const char **xmlattributes) { // Ignore transparent and hidden images - if (!reader.myParseStack.back().opacity || reader.myStyleStack.back().DisplayNone) { + if (!reader.myParseStack.back().opacity || + (!reader.myStyleStack.empty() && reader.myStyleStack.back().DisplayNone)) { return; }