]> git.lyx.org Git - features.git/commitdiff
Fix typo found by coverity
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 7 Mar 2017 11:02:54 +0000 (12:02 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 7 Mar 2017 11:02:54 +0000 (12:02 +0100)
We were not testing for the right end(), although it is not sure that
an actual bug could be triggered because of that.

src/Format.cpp

index b605c4ee4a286200771b2dd9065e18efd68afc19..1b53d734229a5ae18b42ba430b73acc11d1f5ebe 100644 (file)
@@ -433,7 +433,7 @@ string Formats::getFormatFromFile(FileName const & filename) const
                                        Formats::const_iterator cit =
                                                find_if(formatlist.begin(), formatlist.end(),
                                                        FormatMimeEqual(mime));
                                        Formats::const_iterator cit =
                                                find_if(formatlist.begin(), formatlist.end(),
                                                        FormatMimeEqual(mime));
-                                       if (cit != formats.end()) {
+                                       if (cit != formatlist.end()) {
                                                LYXERR(Debug::GRAPHICS, "\tgot format from MIME type: "
                                                        << mime << " -> " << cit->name());
                                                // See special eps/ps handling below
                                                LYXERR(Debug::GRAPHICS, "\tgot format from MIME type: "
                                                        << mime << " -> " << cit->name());
                                                // See special eps/ps handling below