diff options
Diffstat (limited to 'src/script/api/qscriptvalueiterator.cpp')
-rw-r--r-- | src/script/api/qscriptvalueiterator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/api/qscriptvalueiterator.cpp b/src/script/api/qscriptvalueiterator.cpp index ecda5fc..d8c7b64 100644 --- a/src/script/api/qscriptvalueiterator.cpp +++ b/src/script/api/qscriptvalueiterator.cpp @@ -162,7 +162,7 @@ QScriptValueIterator::~QScriptValueIterator() bool QScriptValueIterator::hasNext() const { Q_D(const QScriptValueIterator); - if (!d) + if (!d || !d->engine()) return false; const_cast<QScriptValueIteratorPrivate*>(d)->ensureInitialized(); @@ -198,7 +198,7 @@ void QScriptValueIterator::next() bool QScriptValueIterator::hasPrevious() const { Q_D(const QScriptValueIterator); - if (!d) + if (!d || !d->engine()) return false; const_cast<QScriptValueIteratorPrivate*>(d)->ensureInitialized(); |