diff options
Diffstat (limited to 'src/declarative/qml/qmlprivate.h')
-rw-r--r-- | src/declarative/qml/qmlprivate.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/declarative/qml/qmlprivate.h b/src/declarative/qml/qmlprivate.h index e5b1060..0eec43c 100644 --- a/src/declarative/qml/qmlprivate.h +++ b/src/declarative/qml/qmlprivate.h @@ -283,7 +283,8 @@ int QmlPrivate::list_op(QmlPrivate::ListOp op, int val, } break; case QmlPrivate::Value: - *((QVariant *)*out) = QVariant::fromValue(list->at(val)); + if (list->count() <= val) *((QVariant *)*out) = QVariant(); + else *((QVariant *)*out) = QVariant::fromValue(list->at(val)); break; } return 0; |