summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpainter.cpp
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@jollamobile.com>2014-04-02 13:54:14 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-03 01:15:16 +0200
commit5ef4e0ed0c107c8ac0f4bf26c0fe986ab6e984fb (patch)
tree8aeb87a586effd38a9c86c2ec16fb311a25e0bd4 /src/gui/painting/qpainter.cpp
parent78f6d144d6c1d0ed6880bbf99310fe03e8502567 (diff)
QPainter: Fix a hard to trigger null dereference in QPainterPrivate::drawTextItem.
Done-with: Mohammed Hassan <mohammed.hassan@jollamobile.com> Change-Id: I24c724d24346fb5be8c4a66d68a11d51be5ad5f2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/gui/painting/qpainter.cpp')
-rw-r--r--src/gui/painting/qpainter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index fe5fc051df..a3b1f07c69 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -6416,6 +6416,7 @@ void QPainterPrivate::drawTextItem(const QPointF &p, const QTextItem &_ti, QText
continue;
+ multi->ensureEngineAt(which);
QTextItemInt ti2 = ti.midItem(multi->engine(which), start, end - start);
ti2.width = 0;
// set the high byte to zero and calc the width
@@ -6443,6 +6444,7 @@ void QPainterPrivate::drawTextItem(const QPointF &p, const QTextItem &_ti, QText
which = e;
}
+ multi->ensureEngineAt(which);
QTextItemInt ti2 = ti.midItem(multi->engine(which), start, end - start);
ti2.width = 0;
// set the high byte to zero and calc the width