From 36ad3af48ee7b576f28ea56065711ec8c803f33c Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Thu, 30 Mar 2017 11:35:24 -0700 Subject: [PATCH] attempt to avoid a hang on shutdown --- libraries/fbx/src/OBJReader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/fbx/src/OBJReader.cpp b/libraries/fbx/src/OBJReader.cpp index c1bb72dff8..3b68af075e 100644 --- a/libraries/fbx/src/OBJReader.cpp +++ b/libraries/fbx/src/OBJReader.cpp @@ -294,7 +294,7 @@ QNetworkReply* OBJReader::request(QUrl& url, bool isTest) { QObject::connect(netReply, SIGNAL(finished()), &loop, SLOT(quit())); loop.exec(); // Nothing is going to happen on this whole run thread until we get this static const int WAIT_TIMEOUT_MS = 500; - while (qApp && !aboutToQuit && !netReply->isReadable()) { + while (!aboutToQuit && qApp && !netReply->isReadable()) { netReply->waitForReadyRead(WAIT_TIMEOUT_MS); // so we might as well block this thread waiting for the response, rather than } QObject::disconnect(connection);