Index: trunk/pstamp/scripts/pstamp_checkdependent.pl
===================================================================
--- trunk/pstamp/scripts/pstamp_checkdependent.pl	(revision 29050)
+++ trunk/pstamp/scripts/pstamp_checkdependent.pl	(revision 29052)
@@ -644,5 +644,8 @@
     # if the input file is already magicked no need to queue destreaking for this chipRun
     if ($need_magic and !$input_magicked) {
-        if ($dsRun_state eq 'cleaned') {
+        if (!defined($dsRun_state) or ($dsRun_state eq 'NULL')) {
+            print "No magicDSRun for chipRun $stage_id and magic is required\n";
+            faultJobs('stop', undef, undef, $PSTAMP_NOT_DESTREAKED);
+        } elsif ($dsRun_state eq 'cleaned') {
             my $command = "$magicdstool -updaterun -set_state new -stage $stage -stage_id $stage_id";
             $command .= " -set_label $rlabel" if $rlabel;
@@ -658,5 +661,5 @@
             }
         } elsif ($dsRun_state eq 'failed_revert') {
-            print "magicDSRun.state = $dsRun_state for chipRun $stage_id is in state failed_revert cannot update";
+            print "magicDSRun.state = $dsRun_state for chipRun $stage_id is in state failed_revert cannot update\n";
             faultJobs('stop', undef, undef, $PSTAMP_NOT_AVAILABLE);
         } else {
