diff options
Diffstat (limited to 'src/script/api/qscriptengine.cpp')
-rw-r--r-- | src/script/api/qscriptengine.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index b06ff0c..dc0e0d0 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -776,7 +776,11 @@ QScriptEnginePrivate::QScriptEnginePrivate() qMetaTypeId<QObjectList>(); #endif - JSC::initializeThreading(); // ### hmmm + if (!QCoreApplication::instance()) { + qFatal("QScriptEngine: Must construct a Q(Core)Application before a QScriptEngine"); + return; + } + JSC::initializeThreading(); globalData = JSC::JSGlobalData::create().releaseRef(); globalData->clientData = new QScript::GlobalClientData(this); |