Index: trunk/psLib/src/db/psDB.c
===================================================================
--- trunk/psLib/src/db/psDB.c	(revision 10233)
+++ trunk/psLib/src/db/psDB.c	(revision 10241)
@@ -12,6 +12,6 @@
  *  @author Joshua Hoblitt
  *
- *  @version $Revision: 1.117 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-11-22 04:34:40 $
+ *  @version $Revision: 1.118 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-11-28 22:41:47 $
  *
  *  Copyright (C) 2005-2006  Joshua Hoblitt, University of Hawaii
@@ -1184,4 +1184,10 @@
                     psTime *time = (psTime *)item->data.V;
                     struct tm *tmTime = psTimeToTM(time);
+                    if (!tmTime) {
+                        psError(PS_ERR_UNKNOWN, false, _("failed to convert psTime to struct tm"));
+                        psFree(cursor);
+
+                        return false;
+                    }
 
                     // XXX it wouldn't hurt to make this conversion it's own
