added missing null check libresapi ApiPluginHandler

This commit is contained in:
electron128 2015-12-18 19:05:18 +01:00
parent b1b75a35a1
commit adfa94d237

View File

@ -8,6 +8,9 @@ ApiPluginHandler::ApiPluginHandler(StateTokenServer* statetokenserver, const RsP
for(int i = 0; i < ifaces.mPluginHandler->nbPlugins(); i++) for(int i = 0; i < ifaces.mPluginHandler->nbPlugins(); i++)
{ {
RsPlugin* plugin = ifaces.mPluginHandler->plugin(i); RsPlugin* plugin = ifaces.mPluginHandler->plugin(i);
// if plugin is not loaded, pointer is null
if(plugin == 0)
continue;
std::string entrypoint; std::string entrypoint;
ResourceRouter* child = plugin->new_resource_api_handler(ifaces, statetokenserver, entrypoint); ResourceRouter* child = plugin->new_resource_api_handler(ifaces, statetokenserver, entrypoint);
if(child != 0) if(child != 0)