diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2011-05-11 14:18:20 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-05-11 14:18:20 (GMT) |
commit | 71abe0bb4e2e5cde25fde1817372374d3f4ed095 (patch) | |
tree | 9d4ffbdfb97e99a131e80f98c8e0113f23c05ccc /src/corelib/tools | |
parent | 8447f5616be731d78081f326bb9cb3f5aa9087a4 (diff) | |
parent | 1a742a039802b32cfe2a92d8ef1a04c3a21a964f (diff) | |
download | Qt-71abe0bb4e2e5cde25fde1817372374d3f4ed095.zip Qt-71abe0bb4e2e5cde25fde1817372374d3f4ed095.tar.gz Qt-71abe0bb4e2e5cde25fde1817372374d3f4ed095.tar.bz2 |
Merge remote-tracking branch 'origin/4.8'
Diffstat (limited to 'src/corelib/tools')
-rw-r--r-- | src/corelib/tools/qtextboundaryfinder.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qtextboundaryfinder.cpp b/src/corelib/tools/qtextboundaryfinder.cpp index 34bc406..47319d4 100644 --- a/src/corelib/tools/qtextboundaryfinder.cpp +++ b/src/corelib/tools/qtextboundaryfinder.cpp @@ -199,11 +199,11 @@ QTextBoundaryFinder &QTextBoundaryFinder::operator=(const QTextBoundaryFinder &o chars = other.chars; length = other.length; pos = other.pos; - freePrivate = true; QTextBoundaryFinderPrivate *newD = (QTextBoundaryFinderPrivate *) - realloc(d, length*sizeof(HB_CharAttributes)); + realloc(freePrivate ? d : 0, length*sizeof(HB_CharAttributes)); Q_CHECK_PTR(newD); + freePrivate = true; d = newD; memcpy(d, other.d, length*sizeof(HB_CharAttributes)); |