From 3732d24e0d228eb1e00c32a9fdc8cb371f9be280 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Mon, 27 May 2019 20:03:40 -0400 Subject: findFile() seems to return null in some cases and crash on the line below this is a quick fix for this particular crash, there's probably something deeper to fix --- src/pluginlist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pluginlist.cpp') 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>> alternatives = file->getAlternatives(); if (std::find_if(alternatives.begin(), alternatives.end(), [&](const std::pair>& element) { return element.first == origin.getID(); }) == alternatives.end()) continue; -- cgit v1.3.1