Index: /trunk/psLib/src/dataIO/psDB.c
===================================================================
--- /trunk/psLib/src/dataIO/psDB.c	(revision 4372)
+++ /trunk/psLib/src/dataIO/psDB.c	(revision 4373)
@@ -12,6 +12,6 @@
  *  @author Joshua Hoblitt
  *
- *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-24 01:45:09 $
+ *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-24 02:09:23 $
  *
  *  Copyright 2005 Joshua Hoblitt, University of Hawaii
@@ -651,4 +651,16 @@
     unsigned int    i;
     psPtr           column;
+
+    // Verify database object is not null
+    if(dbh == NULL) {
+        psError(PS_ERR_UNEXPECTED_NULL,true,PS_ERRORTEXT_psDB_INVALID_PSDB);
+        return NULL;
+    }
+
+    // Verify table name is not null
+    if(tableName == NULL) {
+        psError(PS_ERR_UNEXPECTED_NULL,true,PS_ERRORTEXT_psDB_NULL_TABLE);
+        return NULL;
+    }
 
     // find column types
Index: /trunk/psLib/src/dataIO/psFileUtilsErrors.dat
===================================================================
--- /trunk/psLib/src/dataIO/psFileUtilsErrors.dat	(revision 4372)
+++ /trunk/psLib/src/dataIO/psFileUtilsErrors.dat	(revision 4373)
@@ -58,4 +58,5 @@
 #
 psDB_INVALID_PSDB                      Invalid psDB has been specified.
+psDB_NULL_TABLE                        NULL table specified.
 psDB_FAILED_TO_CONNECT                 Failed to connect to database.  Error: %s
 psDB_FAILED_TO_CHANGE                  Failed to change database.  Error: %s
Index: /trunk/psLib/src/dataIO/psFileUtilsErrors.h
===================================================================
--- /trunk/psLib/src/dataIO/psFileUtilsErrors.h	(revision 4372)
+++ /trunk/psLib/src/dataIO/psFileUtilsErrors.h	(revision 4373)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-17 21:33:46 $
+ *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-24 02:09:23 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -77,4 +77,5 @@
 #define PS_ERRORTEXT_psFits_FITS_Z_SMALL "Current FITS HDU has %d z-planes, but z-plane %d was specified."
 #define PS_ERRORTEXT_psDB_INVALID_PSDB "Invalid psDB has been specified."
+#define PS_ERRORTEXT_psDB_NULL_TABLE "NULL table specified."
 #define PS_ERRORTEXT_psDB_FAILED_TO_CONNECT "Failed to connect to database.  Error: %s"
 #define PS_ERRORTEXT_psDB_FAILED_TO_CHANGE "Failed to change database.  Error: %s"
Index: /trunk/psLib/src/db/psDB.c
===================================================================
--- /trunk/psLib/src/db/psDB.c	(revision 4372)
+++ /trunk/psLib/src/db/psDB.c	(revision 4373)
@@ -12,6 +12,6 @@
  *  @author Joshua Hoblitt
  *
- *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-24 01:45:09 $
+ *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-24 02:09:23 $
  *
  *  Copyright 2005 Joshua Hoblitt, University of Hawaii
@@ -651,4 +651,16 @@
     unsigned int    i;
     psPtr           column;
+
+    // Verify database object is not null
+    if(dbh == NULL) {
+        psError(PS_ERR_UNEXPECTED_NULL,true,PS_ERRORTEXT_psDB_INVALID_PSDB);
+        return NULL;
+    }
+
+    // Verify table name is not null
+    if(tableName == NULL) {
+        psError(PS_ERR_UNEXPECTED_NULL,true,PS_ERRORTEXT_psDB_NULL_TABLE);
+        return NULL;
+    }
 
     // find column types
