aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/common/qqmljsfixedpoolarray_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/common/qqmljsfixedpoolarray_p.h')
-rw-r--r--src/qml/common/qqmljsfixedpoolarray_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/common/qqmljsfixedpoolarray_p.h b/src/qml/common/qqmljsfixedpoolarray_p.h
index b65b994d6c..15a8cd6878 100644
--- a/src/qml/common/qqmljsfixedpoolarray_p.h
+++ b/src/qml/common/qqmljsfixedpoolarray_p.h
@@ -86,7 +86,7 @@ public:
if (QTypeInfo<T>::isComplex) {
for (int i = 0; i < count; ++i)
new (data + i) T(vector.at(i));
- } else {
+ } else if (count) {
memcpy(data, static_cast<const void*>(vector.constData()), count * sizeof(T));
}
}