diff transform/TransformFactory.cpp @ 576:2ba202c5be8d

* various minor bits
author Chris Cannam
date Mon, 16 Mar 2009 16:36:23 +0000
parents 2d551c765d51
children ecbd99d5d2c4
line wrap: on
line diff
--- a/transform/TransformFactory.cpp	Mon Mar 16 16:32:02 2009 +0000
+++ b/transform/TransformFactory.cpp	Mon Mar 16 16:36:23 2009 +0000
@@ -325,7 +325,9 @@
     TransformDescriptionMap transforms;
 
     populateFeatureExtractionPlugins(transforms);
+    if (m_exiting) return;
     populateRealTimePlugins(transforms);
+    if (m_exiting) return;
 
     // disambiguate plugins with similar names
 
@@ -389,6 +391,7 @@
 {
     std::vector<QString> plugs =
 	FeatureExtractionPluginFactory::getAllPluginIdentifiers();
+    if (m_exiting) return;
 
     for (size_t i = 0; i < plugs.size(); ++i) {
 
@@ -485,6 +488,7 @@
 {
     std::vector<QString> plugs =
 	RealTimePluginFactory::getAllPluginIdentifiers();
+    if (m_exiting) return;
 
     static QRegExp unitRE("[\\[\\(]([A-Za-z0-9/]+)[\\)\\]]$");
 
@@ -617,13 +621,17 @@
 void
 TransformFactory::populateUninstalledTransforms()
 {
+    if (m_exiting) return;
+
     populateTransforms();
+    if (m_exiting) return;
 
     MutexLocker locker(&m_uninstalledTransformsMutex,
                        "TransformFactory::populateUninstalledTransforms");
     if (m_uninstalledTransformsPopulated) return;
 
     PluginRDFIndexer::getInstance()->indexConfiguredURLs();
+    if (m_exiting) return;
 
     //!!! This will be amazingly slow
 
@@ -710,7 +718,7 @@
             m_uninstalledTransforms[tid] = td;
         }
 
-        if (m_exiting) break;
+        if (m_exiting) return;
     }
 
     m_uninstalledTransformsPopulated = true;