WSL/SLF GitLab Repository

Commit 4c6549bd authored by Mathias Bavay's avatar Mathias Bavay
Browse files

When a plugin was throwing an exception, the mapPlugins could get corrupted in...

When a plugin was throwing an exception, the mapPlugins could get corrupted in the (rare) case of the caller catching and moving forward (uncaught NULL pointer). This is now not anymore possible, by design.
parent 94b2cbbf
......@@ -216,9 +216,10 @@ IOInterface* IOHandler::getPlugin(const std::string& cfgkey, const std::string&
cfg.getValue(cfgkey, cfgsection, op_src);
if (mapPlugins.find(op_src) == mapPlugins.end()) {
mapPlugins[op_src] = getPlugin(op_src);
if (mapPlugins[op_src]==NULL)
IOInterface *ioPtr = getPlugin(op_src);
if (ioPtr==NULL)
throw IOException("Cannot find plugin " + op_src + " as requested in file " + cfg.getSourceName() + ". Has it been activated through ccmake? Is it declared in IOHandler::getPlugin?", AT);
mapPlugins[op_src] = ioPtr;
}
return mapPlugins[op_src];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment