]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/dpkgpm.cc
* apt-pkg/init.cc:
[apt.git] / apt-pkg / deb / dpkgpm.cc
index aa840f85efccbf3000980af3224f7df3f021293b..94215197c4b4530e1fc4cf1aed5d9945b759aeac 100644 (file)
@@ -843,12 +843,14 @@ bool pkgDPkgPM::Go(int OutStatusFd)
 
         if(stopOnError) 
         {
-           fclose(term_out);
+           if(term_out)
+              fclose(term_out);
            return false;
         }
       }      
    }
-   fclose(term_out);
+   if(term_out)
+      fclose(term_out);
 
    if (RunScripts("DPkg::Post-Invoke") == false)
       return false;