diff options
| author | Al <gabriel.cortesi@outlook.com> | 2019-05-28 09:41:20 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-28 09:41:20 +0200 |
| commit | 28b117b1a6bb14fa8f0805dfca0ad5ec245abb44 (patch) | |
| tree | 473e5fc28f329ee33083795f58b5ec336345160f /src | |
| parent | 622908ee20ae5d74bff6524ff7c8eb044e25238b (diff) | |
| parent | 3732d24e0d228eb1e00c32a9fdc8cb371f9be280 (diff) | |
Merge pull request #738 from isanae/crash-plugin-highlight
fixes a crash when highlighting plugins
Diffstat (limited to 'src')
| -rw-r--r-- | src/pluginlist.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index ec9bdac3..2edb92f5 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -139,7 +139,7 @@ void PluginList::highlightPlugins(const QItemSelectionModel *selection, const MO if (plugins.size() > 0) {
for (auto plugin : plugins) {
MOShared::FileEntry::Ptr file = directoryEntry.findFile(plugin.toStdWString());
- if (file->getOrigin() != origin.getID()) {
+ if (file && file->getOrigin() != origin.getID()) {
const std::vector<std::pair<int, std::pair<std::wstring, int>>> alternatives = file->getAlternatives();
if (std::find_if(alternatives.begin(), alternatives.end(), [&](const std::pair<int, std::pair<std::wstring, int>>& element) { return element.first == origin.getID(); }) == alternatives.end())
continue;
|
