diff --git a/src/views/versioncontrol/versioncontrolobserver.cpp b/src/views/versioncontrol/versioncontrolobserver.cpp index 9f0933a487..175d362bc5 100644 --- a/src/views/versioncontrol/versioncontrolobserver.cpp +++ b/src/views/versioncontrol/versioncontrolobserver.cpp @@ -304,6 +304,13 @@ void VersionControlObserver::initPlugins() continue; } if (enabledPlugins.contains((*it)->name())) { + KPluginLoader pluginLoader(*(*it)); + // Need to cast to int, because pluginVersion() returns -1 as + // an unsigned int for plugins without versions. + if (int(pluginLoader.pluginVersion()) < 2) { + qCWarning(DolphinDebug) << "Can't load old plugin" << (*it)->name(); + continue; + } KVersionControlPlugin* plugin = (*it)->createInstance(this); if (plugin) { m_plugins.append(plugin);