summaryrefslogtreecommitdiff
path: root/src/openvg
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-10-28 09:27:24 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-10-29 12:07:24 +0200
commitc76f9f15d1c604cdf3d68d2147a4a06d227871fa (patch)
treeb92a53c12a38e7f8282ce92d47ea80c1510dd6b9 /src/openvg
parentcb2a108d79b09ec6ea91106e7f33826dceac4a42 (diff)
downloadqt4-tools-c76f9f15d1c604cdf3d68d2147a4a06d227871fa.tar.gz
Fix possible crash in QStaticText and QDeclarativeTextLayout
The QStaticTextItem held an uncounted reference to QFontEngine. The pointer would dangle in some cases where there was no font object referencing the engine and the cache was cleaned out (e.g. when a new application font is added.) Properly count the reference, and also add reference counting to userData to make it harder to shoot yourself in the foot, since the QStaticTextItem class is now being used in different places, Task-number: QTBUG-14446 Reviewed-by: Martin Jones
Diffstat (limited to 'src/openvg')
-rw-r--r--src/openvg/qpaintengine_vg.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
index ce9d11a307..f8788b0a08 100644
--- a/src/openvg/qpaintengine_vg.cpp
+++ b/src/openvg/qpaintengine_vg.cpp
@@ -3407,7 +3407,7 @@ void QVGPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textItem)
void QVGPaintEngine::drawStaticTextItem(QStaticTextItem *textItem)
{
- drawCachedGlyphs(textItem->numGlyphs, textItem->glyphs, textItem->font, textItem->fontEngine,
+ drawCachedGlyphs(textItem->numGlyphs, textItem->glyphs, textItem->font, textItem->fontEngine(),
QPointF(0, 0), textItem->glyphPositions);
}