Index: trunk/psLib/src/db/psDB.c
===================================================================
--- trunk/psLib/src/db/psDB.c	(revision 4256)
+++ trunk/psLib/src/db/psDB.c	(revision 4262)
@@ -12,6 +12,6 @@
  *  @author Joshua Hoblitt
  *
- *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-15 01:01:08 $
+ *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-15 01:47:30 $
  *
  *  Copyright 2005 Joshua Hoblitt, University of Hawaii
@@ -159,6 +159,15 @@
 bool psDBChange(psDB *dbh, const char *dbname)
 {
+    // Verify database object is valid
+    if(dbh == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_TYPE, true,
+                PS_ERRORTEXT_psDB_INVALID_PSDB);
+        return false;
+    }
+
+    // Attempt to select new database
     if (mysql_select_db(dbh->mysql, dbname) != 0) {
-        psError(PS_ERR_UNKNOWN, true, "Failed to change database.  Error: %s", mysql_error(dbh->mysql));
+        psError(PS_ERR_UNKNOWN, true, PS_ERRORTEXT_psDB_FAILED_TO_CHANGE,
+                mysql_error(dbh->mysql));
 
         return false;
