VERY experimental Nintendo Switch 2 emulator
C++
Services/VI: Dereferencing an uninitialized std::optional is undefined behavior.
Subvb0ec648f85f1
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cppindex 5120abfffe..412d5b0c98 100644--- a/src/core/hle/service/vi/vi.cpp+++ b/src/core/hle/service/vi/vi.cpp@@ -542,6 +542,8 @@ private:// Repeat TransactParcel DequeueBuffer when a buffer is availableauto buffer_queue = nv_flinger->GetBufferQueue(id);std::optional<u32> slot = buffer_queue->DequeueBuffer(width, height);+ ASSERT_MSG(slot != std::nullopt, "Could not dequeue buffer.");+IGBPDequeueBufferResponseParcel response{*slot};ctx.WriteBuffer(response.Serialize());IPC::ResponseBuilder rb{ctx, 2};