aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlmodels
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmlmodels')
-rw-r--r--src/qmlmodels/qqmllistmodel.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qmlmodels/qqmllistmodel.cpp b/src/qmlmodels/qqmllistmodel.cpp
index d51b9c1c1e..39fdb1c582 100644
--- a/src/qmlmodels/qqmllistmodel.cpp
+++ b/src/qmlmodels/qqmllistmodel.cpp
@@ -284,7 +284,8 @@ void StringOrTranslation::setString(const QString &s)
arrayData = dataPointer->d_ptr();
stringData = dataPointer->data();
stringSize = mutableString.length();
- arrayData->ref();
+ if (arrayData)
+ arrayData->ref();
}
void StringOrTranslation::setTranslation(const QV4::CompiledData::Binding *binding)