mirror of
https://github.com/ModOrganizer2/modorganizer-plugin_python.git
synced 2026-07-27 14:03:33 -07:00
handle empty variants returned from pluginSetting()
can happen when init() is called when MO has no instance set up
This commit is contained in:
@@ -116,7 +116,9 @@ typedef IPythonRunner* (*CreatePythonRunner_func)(const MOBase::IOrganizer *moIn
|
||||
bool ProxyPython::init(IOrganizer *moInfo)
|
||||
{
|
||||
m_MOInfo = moInfo;
|
||||
if (!m_MOInfo->pluginSetting(name(), "enabled").toBool()) {
|
||||
|
||||
const auto enabled = m_MOInfo->pluginSetting(name(), "enabled");
|
||||
if (!enabled.isNull() && !enabled.toBool()) {
|
||||
m_LoadFailure = FAIL_NONE;
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user