return null when dlopen() fails to load a plugin shared object
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 5 Nov 2009 19:29:18 +0000 (19:29 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 5 Nov 2009 19:29:18 +0000 (19:29 +0000)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@6020 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/ladspa_plugin.cc

index 16a87888b51c4fa0c19549c8f8cae5a7fcf02401..c782b54f18769bcb434036e0d1006b34f7a7f4e3 100644 (file)
@@ -657,6 +657,7 @@ LadspaPluginInfo::load (Session& session)
                if ((module = dlopen (path.c_str(), RTLD_NOW)) == 0) {
                        error << string_compose(_("LADSPA: cannot load module from \"%1\""), path) << endmsg;
                        error << dlerror() << endmsg;
+                       return PluginPtr ((Plugin*) 0);
                } else {
                        plugin.reset (new LadspaPlugin (module, session.engine(), session, index, session.frame_rate()));
                }