1.1 --- a/core/systems/ExtensionSys.cpp Sat Nov 10 03:18:55 2007 +0000
1.2 +++ b/core/systems/ExtensionSys.cpp Sat Nov 10 05:46:09 2007 +0000
1.3 @@ -53,8 +53,8 @@
1.4
1.5 CRemoteExtension::CRemoteExtension(IExtensionInterface *pAPI, const char *filename, const char *path)
1.6 {
1.7 + Initialize(filename, path);
1.8 m_pAPI = pAPI;
1.9 - Initialize(filename, path);
1.10 }
1.11
1.12 CLocalExtension::CLocalExtension(const char *filename)
1.13 @@ -200,7 +200,13 @@
1.14
1.15 bool CExtension::PerformAPICheck(char *error, size_t maxlength)
1.16 {
1.17 - if (!m_pAPI || m_pAPI->GetExtensionVersion() > SMINTERFACE_EXTENSIONAPI_VERSION)
1.18 + if (!m_pAPI)
1.19 + {
1.20 + snprintf(error, maxlength, "No IExtensionInterface instance provided");
1.21 + return false;
1.22 + }
1.23 +
1.24 + if (m_pAPI->GetExtensionVersion() > SMINTERFACE_EXTENSIONAPI_VERSION)
1.25 {
1.26 snprintf(error, maxlength, "Extension version is too new to load (%d, max is %d)", m_pAPI->GetExtensionVersion(), SMINTERFACE_EXTENSIONAPI_VERSION);
1.27 return false;
1.28 @@ -1281,3 +1287,4 @@
1.29
1.30 return pExt;
1.31 }
1.32 +