From 77a60f0c5f55bcac2f2afb025f83675fe9249de7 Mon Sep 17 00:00:00 2001
From: Connor McLaughlin <stenzek@gmail.com>
Date: Sun, 22 Mar 2020 13:15:44 +1000
Subject: [PATCH] HostInterface: Crash fix again for controller switching

---
 src/core/host_interface.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/host_interface.cpp b/src/core/host_interface.cpp
index 7a56ef1fe..9722c2c13 100644
--- a/src/core/host_interface.cpp
+++ b/src/core/host_interface.cpp
@@ -969,7 +969,7 @@ void HostInterface::UpdateSettings(const std::function<void()>& apply_callback)
   {
     if (m_settings.controller_types[i] != old_controller_types[i])
     {
-      if (!controllers_updated)
+      if (m_system && !controllers_updated)
       {
         m_system->UpdateControllers();
         controllers_updated = true;