]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlBibtex.C
fix crash due to invalidated iterator
[lyx.git] / src / frontends / controllers / ControlBibtex.C
index 9d7fb6c069bbffd168d81c666669c397c65caf48..0573d240042379777aeb64ffba5574fa0dcd3f5f 100644 (file)
@@ -22,8 +22,8 @@
 #include "tex_helpers.h"
 #include "gettext.h"
 
+#include "support/filefilterlist.h"
 #include "support/filetools.h"
-#include "support/globbing.h"
 
 using std::pair;
 using std::string;
@@ -79,6 +79,8 @@ void ControlBibtex::getBibStyles(vector<string> & data) const
        for (; it != end; ++it) {
                *it = OnlyFilename(*it);
        }
+       // sort on filename only (no path)
+       std::sort(data.begin(), data.end());
 }
 
 
@@ -97,6 +99,8 @@ void ControlBibtex::getBibFiles(vector<string> & data) const
        for (; it != end; ++it) {
                *it = OnlyFilename(*it);
        }
+       // sort on filename only (no path)
+       std::sort(data.begin(), data.end());
 }