Showing the changes to libraries/script-engine/src/AssetScriptingInterface.cpp (1 of 6 files). Show all
Unified · Split
| @@ -27,10 +27,6 @@ AssetScriptingInterface::AssetScriptingInterface(QScriptEngine* engine) : · 26 unmodified lines | ||
| 27 | 27 | void AssetScriptingInterface::uploadData(QString data, QScriptValue callback) { |
| 28 | 28 | QByteArray dataByteArray = data.toUtf8(); |
| 29 | 29 | auto upload = DependencyManager::get<AssetClient>()->createUpload(dataByteArray); |
| 30 | − if (!upload) { | |
| 31 | − qCWarning(asset_client) << "Error uploading file to asset server"; | |
| 32 | − return; | |
| 33 | − } | |
| 34 | 30 | |
| 35 | 31 | QObject::connect(upload, &AssetUpload::finished, this, [this, callback](AssetUpload* upload, const QString& hash) mutable { |
| 36 | 32 | if (callback.isFunction()) { |
| @@ -61,10 +57,6 @@ void AssetScriptingInterface::downloadData(QString urlString, QScriptValue callb · 24 unmodified lines | ||
| 61 | 57 | auto assetClient = DependencyManager::get<AssetClient>(); |
| 62 | 58 | auto assetRequest = assetClient->createRequest(hash); |
| 63 | 59 | |
| 64 | − if (!assetRequest) { | |
| 65 | − return; | |
| 66 | − } | |
| 67 | − | |
| 68 | 60 | _pendingRequests << assetRequest; |
| 69 | 61 | |
| 70 | 62 | connect(assetRequest, &AssetRequest::finished, this, [this, callback](AssetRequest* request) mutable { |