]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/dpkgpm.cc
merge segfault fix from Mario Sanchez Prada, many thanks
[apt.git] / apt-pkg / deb / dpkgpm.cc
index 6eb3b40acf7e5b862754f5ee65c2edc8262f1491..d1a275a4786551e807445b78dc51860f74d5e758 100644 (file)
@@ -879,7 +879,8 @@ bool pkgDPkgPM::Go(int OutStatusFd)
            const char *s = _("Can not write log, openpty() "
                              "failed (/dev/pts not mounted?)\n");
            fprintf(stderr, "%s",s);
-           fprintf(term_out, "%s",s);
+            if(term_out)
+              fprintf(term_out, "%s",s);
            master = slave = -1;
         }  else {
            struct termios rtt;