summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml/qmlinfo.cpp')
-rw-r--r--src/declarative/qml/qmlinfo.cpp6
1 files changed, 5 insertions, 1 deletions
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(":");