Fix null pointer dereference

Fortunately the function is never actually called with a null pointer.
This commit is contained in:
Oliver Hamlet
2022-12-24 10:22:32 +00:00
parent ce7d9c21cd
commit 3a08a8cf07
+4 -3
View File
@@ -108,9 +108,10 @@ PluginSortingData::PluginSortingData(
std::string PluginSortingData::GetName() const { return plugin_->GetName(); }
bool PluginSortingData::IsMaster() const {
return plugin_ != nullptr && plugin_->IsMaster() ||
(plugin_->IsLightPlugin() &&
!boost::iends_with(plugin_->GetName(), ".esp"));
return plugin_ != nullptr &&
(plugin_->IsMaster() ||
(plugin_->IsLightPlugin() &&
!boost::iends_with(plugin_->GetName(), ".esp")));
}
bool PluginSortingData::LoadsArchive() const {