mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-01 02:03:47 +01:00
iOS: Fix use-after-free when Vulkan init fails
viewDidLoad deleted the graphics context on InitAPI failure but left the member pointing at the freed object, and then kept going - runVulkanRenderLoop and shutdown would both use it. Null it out instead; both already check. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JZk5y4Fzw811WJoNWZb8Sc
This commit is contained in:
1 parent
6aad668a38
commit
89f7094513
1 file changed
+3
-1
@@ -206,7 +206,9 @@ static void VulkanRenderLoop(GraphicsContext *graphicsContext, CAMetalLayer *met
|
||||
g_Config.iGPUBackend = (int)GPUBackend::OPENGL;
|
||||
SetGPUBackend(GPUBackend::OPENGL);
|
||||
delete graphicsContext;
|
||||
// TODO: What to do here?
|
||||
graphicsContext = nullptr; // The render loop and shutdown check for this.
|
||||
// TODO: What to do here? We've switched the config over to GL, but we're still the Metal view controller,
|
||||
// so we won't render anything until the app gets restarted.
|
||||
}
|
||||
|
||||
[self updateResolutionWithView:self.view];
|
||||
|
||||
Reference in new issue
Block a user