1.1 --- a/core/ExtensionSys.cpp Mon Aug 15 20:06:14 2011 +0100
1.2 +++ b/core/ExtensionSys.cpp Mon Aug 15 20:19:07 2011 +0100
1.3 @@ -182,6 +182,28 @@
1.4 {
1.5 bool already;
1.6 m_PlId = g_pMMPlugins->Load(m_Path.c_str(), g_PLID, already, error, maxlength);
1.7 +
1.8 + // Check the plugin didn't refuse load
1.9 + Pl_Status status;
1.10 +
1.11 +#ifndef METAMOD_PLAPI_VERSION
1.12 + const char *file;
1.13 + PluginId source;
1.14 +#endif
1.15 +
1.16 + if (!m_PlId || (
1.17 +#ifndef METAMOD_PLAPI_VERSION
1.18 + g_pMMPlugins->Query(m_PlId, file, status, source)
1.19 +#else
1.20 + g_pMMPlugins->Query(m_PlId, NULL, &status, NULL)
1.21 +#endif
1.22 + && status < Pl_Paused))
1.23 + {
1.24 + m_pLib->CloseLibrary();
1.25 + m_pLib = NULL;
1.26 + m_pAPI = NULL;
1.27 + return false;
1.28 + }
1.29 }
1.30
1.31 if (!CExtension::Load(error, maxlength))