From ccbc4c2d991cd42dbc2943aebe617d31b2c74a59 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Mon, 17 Aug 2020 17:32:58 -0700 Subject: [PATCH] fix possible dangling shared_ptr ptr in ios --- Source/Core/Core/IOS/IOS.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/IOS/IOS.cpp b/Source/Core/Core/IOS/IOS.cpp index ede48baf1b..b5fe88b709 100644 --- a/Source/Core/Core/IOS/IOS.cpp +++ b/Source/Core/Core/IOS/IOS.cpp @@ -824,7 +824,8 @@ void Init() if (!s_ios) return; - auto device = static_cast(s_ios->GetDeviceByName("/dev/sdio/slot0").get()); + auto sdio_slot0 = s_ios->GetDeviceByName("/dev/sdio/slot0"); + auto device = static_cast(sdio_slot0.get()); if (device) device->EventNotify(); });