Index: trunk/magic/remove/src/streaksio.c
===================================================================
--- trunk/magic/remove/src/streaksio.c	(revision 32252)
+++ trunk/magic/remove/src/streaksio.c	(revision 32687)
@@ -632,4 +632,5 @@
 
     if (!isImage(in)) {
+        psLogMsg("streaksremove", PS_LOG_INFO, "%s contains no image\n", in->name);
         return;
     }
@@ -779,4 +780,9 @@
 setupImageRefs(sFile *out, sFile *recoveryOut, sFile *in, int extnum, bool exciseAll)
 {
+    if (!in->image) {
+        // Input file is likely corrupt. XXX: Shouldn't we have caught this earlier?
+        psError(PS_ERR_UNKNOWN, true, "image is null for extension %d of %s file is likely corrupt", extnum, in->name);
+        streaksExit("", PS_EXIT_UNKNOWN_ERROR);
+    }
     if (!exciseAll) {
         // set output image to be the input image
