summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/declarative/qml/qmlengine.cpp3
-rw-r--r--src/declarative/qml/qmlinfo.cpp6
2 files changed, 7 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp
index e3d4840..3cf7e69 100644
--- a/src/declarative/qml/qmlengine.cpp
+++ b/src/declarative/qml/qmlengine.cpp
@@ -648,7 +648,8 @@ QObject *qmlAttachedPropertiesObjectById(int id, const QObject *object, bool cre
}
QmlDeclarativeData::QmlDeclarativeData(QmlContext *ctxt)
-: context(ctxt), bindings(0), deferredComponent(0), attachedProperties(0)
+: context(ctxt), bindings(0), outerContext(0), lineNumber(0), columnNumber(0), deferredComponent(0),
+ deferredIdx(0), attachedProperties(0)
{
}
diff --git a/src/declarative/qml/qmlinfo.cpp b/src/declarative/qml/qmlinfo.cpp
index e47b4ab..bae1682 100644
--- a/src/declarative/qml/qmlinfo.cpp
+++ b/src/declarative/qml/qmlinfo.cpp
@@ -85,7 +85,11 @@ QmlInfo::QmlInfo(QObject *object)
QmlDeclarativeData *ddata = QmlDeclarativeData::get(object);
if (ddata) {
QString location = QLatin1String("(");
- location += ddata->outerContext->baseUrl().toString();
+ if (ddata->outerContext) {
+ location += ddata->outerContext->baseUrl().toString();
+ } else {
+ location += "unknown";
+ }
location += QLatin1String(":");
location += QString::number(ddata->lineNumber);
location += QLatin1String(":");