From 0cdaea97dd035bcbf9d46b8a261b3eeaf4dea69c Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Mon, 5 Oct 2020 21:37:07 -0400 Subject: slap a bunch of shit everywhere until the crashing stops --- filecache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'filecache.cpp') diff --git a/filecache.cpp b/filecache.cpp index 9e4b0b4..c715260 100644 --- a/filecache.cpp +++ b/filecache.cpp @@ -66,7 +66,7 @@ std::string Cache::GetPathIfCached(std::string url) { // this just seems really yucky void Cache::CleanupFutures() { for (auto it = m_futures.begin(); it != m_futures.end();) { - if (it->wait_for(std::chrono::seconds(0)) == std::future_status::ready) + if (it->valid() && it->wait_for(std::chrono::seconds(0)) == std::future_status::ready) it = m_futures.erase(it); else it++; -- cgit v1.2.3