summaryrefslogtreecommitdiff
path: root/qt
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2006-12-22 23:27:53 +0000
committerAlbert Astals Cid <aacid@kde.org>2006-12-22 23:27:53 +0000
commitdd1c134dcf085338a85188c7f205fc300396dc86 (patch)
treea5d66e5484e9f39fbfdc96df66a807e0fec9d9e3 /qt
parent87e474a018c4808d6251fd79f9e9640e0f733551 (diff)
qt/poppler-page.cc: Fix memory leak in Page::textList. Patch by Jerry Epplin <jepplin@globalvelocity.com>
Diffstat (limited to 'qt')
-rw-r--r--qt/poppler-page.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/qt/poppler-page.cc b/qt/poppler-page.cc
index 1412a76f..4d073c41 100644
--- a/qt/poppler-page.cc
+++ b/qt/poppler-page.cc
@@ -156,7 +156,9 @@ QValueList<TextBox*> Page::textList() const
for (int i = 0; i < word_list->getLength(); i++) {
TextWord *word = word_list->get(i);
- QString string = QString::fromUtf8(word->getText()->getCString());
+ GooString *word_str = word->getText();
+ QString string = QString::fromUtf8(word_str->getCString());
+ delete word_str;
double xMin, yMin, xMax, yMax;
word->getBBox(&xMin, &yMin, &xMax, &yMax);