summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLu Wang <coolwanglu@gmail.com>2012-09-26 00:52:32 +0200
committerAlbert Astals Cid <aacid@kde.org>2012-09-26 00:52:32 +0200
commit671df5dad0732882ceb9e053c3f947dfe0597f3d (patch)
treebd347638bccf9c9ffd68b386f302ecd90fecd782
parentf8c116f1e0fbf3516ce228fbb34c33d6b618bed0 (diff)
Don't close the stream if it's not a stream
-rw-r--r--poppler/PSOutputDev.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index f414897f..e4c925cd 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -27,6 +27,7 @@
// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
// Copyright (C) 2009-2011 Adrian Johnson <ajohnson@redneon.com>
// Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it>
+// Copyright (C) 2012 Lu Wang <coolwanglu@gmail.com>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -2151,7 +2152,8 @@ void PSOutputDev::setupEmbeddedType1Font(Ref *id, GooString *psName) {
writePS("%%EndResource\n");
err1:
- strObj.streamClose();
+ if (strObj.isStream())
+ strObj.streamClose();
strObj.free();
}