1.1 --- a/sourcemm/metamod_plugins.cpp Mon Oct 08 18:47:31 2007 +0000
1.2 +++ b/sourcemm/metamod_plugins.cpp Mon Oct 08 18:51:51 2007 +0000
1.3 @@ -623,7 +623,7 @@
1.4 return status;
1.5 }
1.6
1.7 -bool CPluginManager::Query(PluginId id, const char *&file, Pl_Status &status, PluginId &source)
1.8 +bool CPluginManager::Query(PluginId id, const char **file, Pl_Status *status, PluginId *source)
1.9 {
1.10 CPlugin *pl = FindById(id);
1.11
1.12 @@ -632,9 +632,20 @@
1.13 return false;
1.14 }
1.15
1.16 - file = pl->m_File.c_str();
1.17 - status = pl->m_Status;
1.18 - source = pl->m_Source;
1.19 + if (file != NULL)
1.20 + {
1.21 + *file = pl->m_File.c_str();
1.22 + }
1.23 +
1.24 + if (status != NULL)
1.25 + {
1.26 + *status = pl->m_Status;
1.27 + }
1.28 +
1.29 + if (source != NULL)
1.30 + {
1.31 + *source = pl->m_Source;
1.32 + }
1.33
1.34 return true;
1.35 }
1.36 @@ -655,7 +666,7 @@
1.37 return pl->m_API->QueryRunning(error, maxlength);
1.38 }
1.39
1.40 -bool CPluginManager::QueryHandle(PluginId id, void *&handle)
1.41 +bool CPluginManager::QueryHandle(PluginId id, void **handle)
1.42 {
1.43 CPlugin *pl = FindById(id);
1.44
1.45 @@ -664,7 +675,10 @@
1.46 return false;
1.47 }
1.48
1.49 - handle = static_cast<void *>(pl->m_Lib);
1.50 + if (handle)
1.51 + {
1.52 + *handle = static_cast<void *>(pl->m_Lib);
1.53 + }
1.54
1.55 return true;
1.56 }