summaryrefslogtreecommitdiff
path: root/src/qml/jsruntime/qv4arraydata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4arraydata.cpp')
-rw-r--r--src/qml/jsruntime/qv4arraydata.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4arraydata.cpp b/src/qml/jsruntime/qv4arraydata.cpp
index c40f50153d..3235a116ee 100644
--- a/src/qml/jsruntime/qv4arraydata.cpp
+++ b/src/qml/jsruntime/qv4arraydata.cpp
@@ -740,7 +740,7 @@ void ArrayData::sort(ExecutionContext *context, Object *thisObject, const ValueR
if (!len)
return;
- if (!thisObject->arrayData()->length())
+ if (!thisObject->arrayData() || !thisObject->arrayData()->length())
return;
if (!(comparefn->isUndefined() || comparefn->asObject())) {