Index: /tags/ipp-20110218/ippScripts/scripts/magic_destreak.pl
===================================================================
--- /tags/ipp-20110218/ippScripts/scripts/magic_destreak.pl	(revision 30695)
+++ /tags/ipp-20110218/ippScripts/scripts/magic_destreak.pl	(revision 30696)
@@ -152,4 +152,9 @@
 
 
+# We don't use recoveryroot for camera stage
+if ($stage eq 'camera') {
+    $recoveryroot = undef;
+}
+
 # default value is "NULL" do not use
 if (defined($recoveryroot) and ($recoveryroot eq "NULL")) {
Index: /tags/ipp-20110218/ippScripts/scripts/magic_destreak_revert.pl
===================================================================
--- /tags/ipp-20110218/ippScripts/scripts/magic_destreak_revert.pl	(revision 30695)
+++ /tags/ipp-20110218/ippScripts/scripts/magic_destreak_revert.pl	(revision 30696)
@@ -451,4 +451,5 @@
 {
     foreach my $file (@_) {
+        next if !$file;
         if ($ipprc->file_exists($file)) {
             if (!$ipprc->file_delete($file)) {
Index: /tags/ipp-20110218/ippTools/src/magicdstool.c
===================================================================
--- /tags/ipp-20110218/ippTools/src/magicdstool.c	(revision 30695)
+++ /tags/ipp-20110218/ippTools/src/magicdstool.c	(revision 30696)
@@ -771,5 +771,4 @@
         break;
     case IPP_STAGE_CAMERA:
-        psFree(query);
         query = NULL;
         clearRunQuery = "UPDATE chipBackgroundRun SET magicked = 0 where chip_bg_id = %" PRId64;
