summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativecomponent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml/qdeclarativecomponent.cpp')
-rw-r--r--src/declarative/qml/qdeclarativecomponent.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp
index d319e8f..5f26ad5 100644
--- a/src/declarative/qml/qdeclarativecomponent.cpp
+++ b/src/declarative/qml/qdeclarativecomponent.cpp
@@ -597,6 +597,11 @@ QDeclarativeComponentPrivate::beginCreate(QDeclarativeContextData *context, cons
return 0;
}
+ if (!context->isValid()) {
+ qWarning("QDeclarativeComponent::beginCreate(): Cannot create a component in an invalid context");
+ return 0;
+ }
+
if (context->engine != engine) {
qWarning("QDeclarativeComponent::beginCreate(): Must create component in context from the same QDeclarativeEngine");
return 0;