diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-05-22 15:43:27 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2013-05-22 15:45:02 +0200 |
commit | e57285b323b0c669841e9be7b2af427958a8c9b6 (patch) | |
tree | 0ad47082126d05184603d991ce5bb559ea3aa153 /src/qml/qml/ftw/qhashedstring_p.h | |
parent | bd0bdcb55dd31c4453d320ab2f7b41abbee0bf16 (diff) |
Fix memory corruption
The QString constructor taking a QStringDataRef doesn't refcount,
so we need to do it manually.
Change-Id: I076df18cfdb94ef796a42281b7bb1027798b609c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/ftw/qhashedstring_p.h')
-rw-r--r-- | src/qml/qml/ftw/qhashedstring_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/qml/ftw/qhashedstring_p.h b/src/qml/qml/ftw/qhashedstring_p.h index a63a85d3c6..8d16892d08 100644 --- a/src/qml/qml/ftw/qhashedstring_p.h +++ b/src/qml/qml/ftw/qhashedstring_p.h @@ -266,6 +266,7 @@ public: if (isQString()) { QStringDataPtr dd; dd.ptr = strData; + strData->ref.ref(); return QString(dd) == s; } else { return QLatin1String(cStrData(), length) == s; |