fix possible dangling shared_ptr ptr in ios
This commit is contained in:
parent
3ee4c53d65
commit
ccbc4c2d99
|
@ -824,7 +824,8 @@ void Init()
|
||||||
if (!s_ios)
|
if (!s_ios)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto device = static_cast<Device::SDIOSlot0*>(s_ios->GetDeviceByName("/dev/sdio/slot0").get());
|
auto sdio_slot0 = s_ios->GetDeviceByName("/dev/sdio/slot0");
|
||||||
|
auto device = static_cast<Device::SDIOSlot0*>(sdio_slot0.get());
|
||||||
if (device)
|
if (device)
|
||||||
device->EventNotify();
|
device->EventNotify();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue