summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextengine.cpp
diff options
context:
space:
mode:
authorMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-09-03 06:54:51 (GMT)
committerMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-09-03 06:54:51 (GMT)
commite7935dc46fcc062b28cc3aa385f389fa3842b190 (patch)
tree1559e188c8a4f3f149d5880e52f31ee996f4be2b /src/gui/text/qtextengine.cpp
parent54796e0d3150df7dd94e715c095c21fb227139ee (diff)
parentfc4d386f2cc8984b98957d83d8cdb57c1105890f (diff)
downloadQt-e7935dc46fcc062b28cc3aa385f389fa3842b190.zip
Qt-e7935dc46fcc062b28cc3aa385f389fa3842b190.tar.gz
Qt-e7935dc46fcc062b28cc3aa385f389fa3842b190.tar.bz2
Merge commit 'staging-1/4.7' into doc-4.7
Diffstat (limited to 'src/gui/text/qtextengine.cpp')
-rw-r--r--src/gui/text/qtextengine.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index c30091e..119217a 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -2139,8 +2139,11 @@ bool QTextEngine::LayoutData::reallocate(int totalGlyphs)
void **newMem = memory;
newMem = (void **)::realloc(memory_on_stack ? 0 : memory, newAllocated*sizeof(void *));
- Q_CHECK_PTR(newMem);
- if (memory_on_stack && newMem)
+ if (!newMem) {
+ layoutState = LayoutFailed;
+ return false;
+ }
+ if (memory_on_stack)
memcpy(newMem, memory, allocated*sizeof(void *));
memory = newMem;
memory_on_stack = false;