diff options
Diffstat (limited to 'backends/plugins/dynamic-plugin.h')
-rw-r--r-- | backends/plugins/dynamic-plugin.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/backends/plugins/dynamic-plugin.h b/backends/plugins/dynamic-plugin.h index ec051c4ed7..0c6a797947 100644 --- a/backends/plugins/dynamic-plugin.h +++ b/backends/plugins/dynamic-plugin.h @@ -28,7 +28,6 @@ #include "base/plugins.h" - class DynamicPlugin : public Plugin { protected: typedef int32 (*IntFunc)(); @@ -45,6 +44,7 @@ public: unloadPlugin(); return false; } + if (verFunc() != PLUGIN_VERSION) { warning("Plugin uses a different API version (you have: '%d', needed is: '%d')", verFunc(), PLUGIN_VERSION); unloadPlugin(); @@ -57,6 +57,7 @@ public: unloadPlugin(); return false; } + _type = (PluginType)typeFunc(); if (_type >= PLUGIN_TYPE_MAX) { warning("Plugin type unknown: %d", _type); @@ -70,6 +71,7 @@ public: unloadPlugin(); return false; } + if (typeVerFunc() != pluginTypeVersions[_type]) { warning("Plugin uses a different type API version (you have: '%d', needed is: '%d')", typeVerFunc(), pluginTypeVersions[_type]); unloadPlugin(); |