3
0
Fork 0
mirror of https://github.com/lubosz/overte.git synced 2025-04-27 09:55:45 +02:00

Update libraries/script-engine/src/ScriptEngine.cpp

Co-authored-by: David Rowe <david@ctrlaltstudio.com>
This commit is contained in:
kasenvr 2020-10-25 19:49:59 -04:00 committed by GitHub
parent 50067e3361
commit 4b2c71cf61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -130,12 +130,7 @@ static QScriptValue debugPrint(QScriptContext* context, QScriptEngine* engine) {
// This message was sent by one of our script engines, let's try to see if we can find the source.
// Note that the first entry in the backtrace should be "print" and is somewhat useless to us
AbstractLoggerInterface* loggerInterface = AbstractLoggerInterface::get();
if (!loggerInterface) {
qCDebug(scriptengine_script, "%s", qUtf8Printable(message));
return QScriptValue();
}
if (loggerInterface->showSourceDebugging()) {
if (loggerInterface && loggerInterface->showSourceDebugging()) {
QScriptContext* userContext = context;
while (userContext && QScriptContextInfo(userContext).functionType() == QScriptContextInfo::NativeFunction) {
userContext = userContext->parentContext();