From adfa94d237e360d0e078c0d2fb21867322e2fc28 Mon Sep 17 00:00:00 2001 From: electron128 Date: Fri, 18 Dec 2015 19:05:18 +0100 Subject: [PATCH] added missing null check libresapi ApiPluginHandler --- libresapi/src/api/ApiPluginHandler.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libresapi/src/api/ApiPluginHandler.cpp b/libresapi/src/api/ApiPluginHandler.cpp index a3f7ad0e4..fe3211eac 100644 --- a/libresapi/src/api/ApiPluginHandler.cpp +++ b/libresapi/src/api/ApiPluginHandler.cpp @@ -8,6 +8,9 @@ ApiPluginHandler::ApiPluginHandler(StateTokenServer* statetokenserver, const RsP for(int i = 0; i < ifaces.mPluginHandler->nbPlugins(); i++) { RsPlugin* plugin = ifaces.mPluginHandler->plugin(i); + // if plugin is not loaded, pointer is null + if(plugin == 0) + continue; std::string entrypoint; ResourceRouter* child = plugin->new_resource_api_handler(ifaces, statetokenserver, entrypoint); if(child != 0)