summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-06-01 09:25:16 -0500
committerDave Parks <davep@lindenlab.com>2022-06-01 09:25:16 -0500
commit609476e607b18d303afa5f5b5eeabeca84f95d16 (patch)
tree3059d50ca77c614886160a7333d5674b32670122 /indra
parentfc7b5549cb6092194d11b8d87600f21992305c1c (diff)
SL-17484 More unit test pruning. Fix for crash when deleting textures.
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/llqueuedthread.cpp5
-rw-r--r--indra/llimage/tests/llimageworker_test.cpp6
-rw-r--r--indra/newview/llviewertexturelist.cpp6
3 files changed, 10 insertions, 7 deletions
diff --git a/indra/llcommon/llqueuedthread.cpp b/indra/llcommon/llqueuedthread.cpp
index 60304fff75..155e32ebae 100644
--- a/indra/llcommon/llqueuedthread.cpp
+++ b/indra/llcommon/llqueuedthread.cpp
@@ -75,6 +75,11 @@ void LLQueuedThread::shutdown()
unpause(); // MAIN THREAD
if (mThreaded)
{
+ if (mRequestQueue.size() == 0)
+ {
+ mRequestQueue.close();
+ }
+
S32 timeout = 100;
for ( ; timeout>0; timeout--)
{
diff --git a/indra/llimage/tests/llimageworker_test.cpp b/indra/llimage/tests/llimageworker_test.cpp
index 57d922b1a1..d36d35aba4 100644
--- a/indra/llimage/tests/llimageworker_test.cpp
+++ b/indra/llimage/tests/llimageworker_test.cpp
@@ -199,12 +199,6 @@ namespace tut
LLImageDecodeThread::handle_t decodeHandle = mThread->decodeImage(NULL, 0, FALSE, new responder_test(&done));
// Verifies we get back a valid handle
ensure("LLImageDecodeThread: threaded decodeImage(), returned handle is null", decodeHandle != 0);
- // Wait a little so to simulate the main thread doing something on its main loop...
- ms_sleep(500); // 500 milliseconds
- // Verifies that the responder has *not* been called yet in the meantime
- ensure("LLImageDecodeThread: responder creation failed", done == false);
- // Ask the thread to update: that means tells the queue to check itself and creates work requests
- mThread->update(1);
// Wait till the thread has time to handle the work order (though it doesn't do much per work order...)
const U32 INCREMENT_TIME = 500; // 500 milliseconds
const U32 MAX_TIME = 20 * INCREMENT_TIME; // Do the loop 20 times max, i.e. wait 10 seconds but no more
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 555355059a..ac036bce31 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -1048,7 +1048,11 @@ F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time)
{
iter = mUUIDMap.begin();
}
- entries.push_back(iter->second);
+
+ if (iter->second->getGLTexture())
+ {
+ entries.push_back(iter->second);
+ }
++iter;
}
}