Index: /branches/pap/psModules/src/detrend/pmDetrendDB.c
===================================================================
--- /branches/pap/psModules/src/detrend/pmDetrendDB.c	(revision 23578)
+++ /branches/pap/psModules/src/detrend/pmDetrendDB.c	(revision 23579)
@@ -191,5 +191,5 @@
     }
 
-    if (strlen(buffer->data) == 0) {
+    if (!buffer->data || strlen(buffer->data) == 0) {
         psError(PS_ERR_IO, true, "Unable to find suitable detrend");
         psLogMsg("psModules.detrend", PS_LOG_ERROR, "detselect command:\n %s\n", line);
