summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-01-15 01:17:19 +0100
committerbunnei <bunneidev@gmail.com>2022-01-15 01:17:19 +0100
commitf6de57c1a52b2170e820f092729e289a8d0ec0c0 (patch)
tree01f52e6791cdbb68cacdd1ffb5177db7f24b33fb /src
parentMerge pull request #7699 from bunnei/fix-service-thread-race (diff)
downloadyuzu-f6de57c1a52b2170e820f092729e289a8d0ec0c0.tar
yuzu-f6de57c1a52b2170e820f092729e289a8d0ec0c0.tar.gz
yuzu-f6de57c1a52b2170e820f092729e289a8d0ec0c0.tar.bz2
yuzu-f6de57c1a52b2170e820f092729e289a8d0ec0c0.tar.lz
yuzu-f6de57c1a52b2170e820f092729e289a8d0ec0c0.tar.xz
yuzu-f6de57c1a52b2170e820f092729e289a8d0ec0c0.tar.zst
yuzu-f6de57c1a52b2170e820f092729e289a8d0ec0c0.zip
Diffstat (limited to 'src')
-rw-r--r--src/common/fiber.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/fiber.cpp b/src/common/fiber.cpp
index 62010d762..81b212e4b 100644
--- a/src/common/fiber.cpp
+++ b/src/common/fiber.cpp
@@ -124,7 +124,10 @@ void Fiber::YieldTo(std::weak_ptr<Fiber> weak_from, Fiber& to) {
// "from" might no longer be valid if the thread was killed
if (auto from = weak_from.lock()) {
- ASSERT(from->impl->previous_fiber != nullptr);
+ if (from->impl->previous_fiber == nullptr) {
+ ASSERT_MSG(false, "previous_fiber is nullptr!");
+ return;
+ }
from->impl->previous_fiber->impl->context = transfer.fctx;
from->impl->previous_fiber->impl->guard.unlock();
from->impl->previous_fiber.reset();