[APP] Check for null-ptr in input_system while calling OnUsbDeviceChanged

This commit is contained in:
Gliniak
2026-03-25 20:00:52 +01:00
parent b6ad99ee21
commit c2a8dc419c

View File

@@ -305,6 +305,14 @@ void EmulatorWindow::EmulatorWindowListener::OnMouseUp(ui::MouseEvent& e) {
void EmulatorWindow::EmulatorWindowListener::OnUsbDeviceChanged(
bool is_arrival) {
if (!emulator_window_.emulator()) {
return;
}
if (!emulator_window_.emulator()->input_system()) {
return;
}
auto* portal = emulator_window_.emulator()->input_system()->GetPortal();
if (!portal) {
return;