From 02ddd35fc9f11f11b9c0f932701eb0cadd4fe040 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 29 May 2008 18:50:41 +0000 Subject: [PATCH] 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 --- libs/ardour/region_factory.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/ardour/region_factory.cc b/libs/ardour/region_factory.cc index 163cb07c6c..79192f05c5 100644 --- a/libs/ardour/region_factory.cc +++ b/libs/ardour/region_factory.cc @@ -85,7 +85,11 @@ boost::shared_ptr RegionFactory::create (Session& session, XMLNode& node, bool yn) { boost::shared_ptr r = session.XMLRegionFactory (node, yn); - CheckNewRegion (r); + + if (r) { + CheckNewRegion (r); + } + return r; }