[APP] Check for null-ptr in input_system while calling OnUsbDeviceChanged
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user