don't cadd a potentially null region from inside RegionFactory::create()

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3426 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2008-05-29 18:50:41 +00:00
parent 688c7a199a
commit 02ddd35fc9

View file

@ -85,7 +85,11 @@ boost::shared_ptr<Region>
RegionFactory::create (Session& session, XMLNode& node, bool yn)
{
boost::shared_ptr<Region> r = session.XMLRegionFactory (node, yn);
CheckNewRegion (r);
if (r) {
CheckNewRegion (r);
}
return r;
}