remove nullptr check in AssetMappingsScriptingInterface

This commit is contained in:
Stephen Birarda 2016-03-10 10:45:43 -08:00
parent 2bbeac6597
commit 9c53f40fbe
2 changed files with 85 additions and 91 deletions

View file

@ -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);

View file

@ -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));
}
}