[sword-svn] r2251 - trunk/src/mgr

scribe at crosswire.org scribe at crosswire.org
Fri Feb 13 23:01:50 MST 2009


Author: scribe
Date: 2009-02-13 23:01:50 -0700 (Fri, 13 Feb 2009)
New Revision: 2251

Modified:
   trunk/src/mgr/swmgr.cpp
Log:
Added error checks for bad driver entry


Modified: trunk/src/mgr/swmgr.cpp
===================================================================
--- trunk/src/mgr/swmgr.cpp	2009-02-14 05:48:58 UTC (rev 2250)
+++ trunk/src/mgr/swmgr.cpp	2009-02-14 06:01:50 UTC (rev 2251)
@@ -960,11 +960,11 @@
 */
 	}
 
-	// if a specific module type is set in the config, use this
-	if ((entry = section.find("Type")) != section.end())
-		newmod->Type(entry->second.c_str());
+	if (newmod) {
+		// if a specific module type is set in the config, use this
+		if ((entry = section.find("Type")) != section.end())
+			newmod->Type(entry->second.c_str());
 
-	if (newmod){
 		newmod->setConfig(&section);
 	}
 	




More information about the sword-cvs mailing list