mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 15:50:37 +02:00
remove nullptr check in AssetMappingsScriptingInterface
This commit is contained in:
parent
2bbeac6597
commit
9c53f40fbe
2 changed files with 85 additions and 91 deletions
|
@ -38,7 +38,7 @@ void AssetRequest::start() {
|
|||
|
||||
// in case we haven't parsed a valid hash, return an error now
|
||||
if (isValidHash(_hash)) {
|
||||
_result = InvalidHash;
|
||||
_error = InvalidHash;
|
||||
_state = Finished;
|
||||
|
||||
emit finished(this);
|
||||
|
|
|
@ -140,7 +140,6 @@ void AssetMappingModel::refresh() {
|
|||
auto assetClient = DependencyManager::get<AssetClient>();
|
||||
auto request = assetClient->createGetAllMappingsRequest();
|
||||
|
||||
if (request) {
|
||||
connect(request, &GetAllMappingsRequest::finished, this, [this](GetAllMappingsRequest* request) mutable {
|
||||
if (request->getError() == MappingRequest::NoError) {
|
||||
auto mappings = request->getMappings();
|
||||
|
@ -233,9 +232,4 @@ void AssetMappingModel::refresh() {
|
|||
});
|
||||
|
||||
request->start();
|
||||
} else {
|
||||
qDebug() << "NO CONNECTED ASSET SERVER";
|
||||
// not connected to an Asset Server, emit network error
|
||||
emit errorGettingMappings(uint8_t(MappingRequest::NetworkError));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue