Index: /branches/pap/psModules/src/detrend/pmDetrendDB.c
===================================================================
--- /branches/pap/psModules/src/detrend/pmDetrendDB.c	(revision 23577)
+++ /branches/pap/psModules/src/detrend/pmDetrendDB.c	(revision 23578)
@@ -191,4 +191,10 @@
     }
 
+    if (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);
+        goto failure;
+    }
+
     psTrace("psModules.detrend", 5, "got answer: %s\n", buffer->data);
 
