Showing the changes to libraries/script-engine/src/AssetScriptingInterface.cpp (1 of 1 file). Show all
Unified · Split
| @@ -127,6 +127,9 @@ void AssetScriptingInterface::setBakingEnabled(QString path, bool enabled, QScri · 126 unmodified lines | ||
| 127 | 127 | auto setBakingEnabledRequest = DependencyManager::get<AssetClient>()->createSetBakingEnabledRequest({ path }, enabled); |
| 128 | 128 | |
| 129 | 129 | Promise deferred = jsPromiseReady(makePromise(__FUNCTION__), thisObject(), callback); |
| 130 | + if (!deferred) { | |
| 131 | + return; | |
| 132 | + } | |
| 130 | 133 | |
| 131 | 134 | connect(setBakingEnabledRequest, &SetBakingEnabledRequest::finished, setBakingEnabledRequest, [deferred](SetBakingEnabledRequest* request) { |
| 132 | 135 | Q_ASSERT(QThread::currentThread() == request->thread()); |