From ba97ea29d33acf9ab421f4d8ef5202ec83231d7e Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Tue, 27 Apr 2010 16:42:09 +1000 Subject: Ensure text document is created before we access it. --- src/declarative/graphicsitems/qdeclarativetext.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index 0b59503..2b8da8e 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -717,6 +717,7 @@ void QDeclarativeTextPrivate::updateSize() dy -= size.height(); } else { singleline = false; // richtext can't elide or be optimized for single-line case + ensureDoc(); doc->setDefaultFont(font); QTextOption option((Qt::Alignment)int(hAlign | vAlign)); option.setWrapMode(QTextOption::WrapMode(wrapMode)); -- cgit v0.12