diff options
author | Morten Engvoldsen <morten.engvoldsen@nokia.com> | 2010-09-03 06:54:51 (GMT) |
---|---|---|
committer | Morten Engvoldsen <morten.engvoldsen@nokia.com> | 2010-09-03 06:54:51 (GMT) |
commit | e7935dc46fcc062b28cc3aa385f389fa3842b190 (patch) | |
tree | 1559e188c8a4f3f149d5880e52f31ee996f4be2b /src/gui/text/qtextengine.cpp | |
parent | 54796e0d3150df7dd94e715c095c21fb227139ee (diff) | |
parent | fc4d386f2cc8984b98957d83d8cdb57c1105890f (diff) | |
download | Qt-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.cpp | 7 |
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; |