mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-07 20:34:32 +02:00
Prevent Interface from crashing when a Snapshot upload fails
This commit is contained in:
parent
2e37b4a312
commit
8e46ebf83b
2 changed files with 4 additions and 6 deletions
|
@ -65,7 +65,7 @@ void SnapshotUploader::uploadSuccess(QNetworkReply& reply) {
|
|||
|
||||
} else {
|
||||
emit DependencyManager::get<WindowScriptingInterface>()->snapshotShared(true, contents);
|
||||
delete this;
|
||||
this->deleteLater();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -76,13 +76,13 @@ void SnapshotUploader::uploadFailure(QNetworkReply& reply) {
|
|||
replyString = reply.errorString();
|
||||
}
|
||||
emit DependencyManager::get<WindowScriptingInterface>()->snapshotShared(true, replyString); // maybe someday include _inWorldLocation, _filename?
|
||||
delete this;
|
||||
this->deleteLater();
|
||||
}
|
||||
|
||||
void SnapshotUploader::createStorySuccess(QNetworkReply& reply) {
|
||||
QString replyString = reply.readAll();
|
||||
emit DependencyManager::get<WindowScriptingInterface>()->snapshotShared(false, replyString);
|
||||
delete this;
|
||||
this->deleteLater();
|
||||
}
|
||||
|
||||
void SnapshotUploader::createStoryFailure(QNetworkReply& reply) {
|
||||
|
@ -92,6 +92,6 @@ void SnapshotUploader::createStoryFailure(QNetworkReply& reply) {
|
|||
replyString = reply.errorString();
|
||||
}
|
||||
emit DependencyManager::get<WindowScriptingInterface>()->snapshotShared(true, replyString);
|
||||
delete this;
|
||||
this->deleteLater();
|
||||
}
|
||||
|
||||
|
|
|
@ -411,8 +411,6 @@ function snapshotUploaded(isError, reply) {
|
|||
} else {
|
||||
print('Ignoring snapshotUploaded() callback for stale ' + (isGif ? 'GIF' : 'Still' ) + ' snapshot. Stale story ID:', storyID);
|
||||
}
|
||||
} else {
|
||||
print(reply);
|
||||
}
|
||||
isUploadingPrintableStill = false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue