[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: =?utf-8?q?=5Bcalligra=5D_plugins/textshape=3A_fix_crash_cause_of?=
From: Sebastian Sauer <sebastian.sauer () kdab ! com>
Date: 2011-01-28 0:42:05
Message-ID: 20110128004205.6024FA6094 () git ! kde ! org
[Download RAW message or body]
Git commit 78c75cb6ce19dfdd6eaa2bbc6ae924037d049b7e by Sebastian Sauer.
Pushed by sebsauer into branch 'master'.
fix crash cause of invalid qtextline
M +3 -1 plugins/textshape/Layout.cpp
http://commits.kde.org/47e7010d/78c75cb6ce19dfdd6eaa2bbc6ae924037d049b7e
diff --git a/plugins/textshape/Layout.cpp b/plugins/textshape/Layout.cpp
index 4c05ce5..a4d4dae 100644
--- a/plugins/textshape/Layout.cpp
+++ b/plugins/textshape/Layout.cpp
@@ -351,6 +351,8 @@ bool Layout::addLine()
m_block.layout()->beginLayout();
foreach(const LineKeeper &lk, lineKeeps) {
line = m_block.layout()->createLine();
+ if (!line.isValid())
+ break;
line.setLineWidth(lk.lineWidth);
line.setPosition(lk.position);
}
@@ -365,7 +367,7 @@ bool Layout::addLine()
if (m_textShape) // kword uses a dummy shape which is not a text shape
m_textShape->markLayoutDone();
nextShape();
- if (m_data)
+ if (m_data && line.isValid())
m_data->setPosition(m_block.position() + (entireParagraphMoved ? 0 : \
line.textStart() + line.textLength()));
// the demo-text feature means we have exactly the same amount of text as we \
have frame-space
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic