summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-12-14 17:45:51 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2009-12-14 17:45:51 +0100
commit6847d275374c198f787c4978a49e7056f65a0a3d (patch)
tree9f05383d60e7e3095a06dea5b921f699d11d6712 /apt-pkg
parent643e847bda9650f859c27cce574993c5d25e8953 (diff)
merge segfault fix from Mario Sanchez Prada, many thanks
(closes: #561109)
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/deb/dpkgpm.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index 6eb3b40ac..d1a275a47 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -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;