Skip to content

Commit

Permalink
Merge pull request overte-org#840 from kasenvr/fix/ess-logging-crash
Browse files Browse the repository at this point in the history
Prevent crash on entity-script-server due to logging interface.
  • Loading branch information
two-one-five authored Oct 26, 2020
2 parents f1194ee + 4b2c71c commit 5c945c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/script-engine/src/ScriptEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +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->showSourceDebugging()) {
if (loggerInterface && loggerInterface->showSourceDebugging()) {
QScriptContext* userContext = context;
while (userContext && QScriptContextInfo(userContext).functionType() == QScriptContextInfo::NativeFunction) {
userContext = userContext->parentContext();
Expand Down

0 comments on commit 5c945c1

Please sign in to comment.