[fbreader] Fixed a problem with displaying certain images

Some images (those with empty style stack) were erroneously
recognized as hidden.
This commit is contained in:
Slava Monich 2017-08-01 18:16:26 +03:00
parent 34ed5ac9ce
commit 077e86da62

View file

@ -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;
}