Procházet zdrojové kódy

Fixed switching operation modes when not running a game

The service manager seems to be a nullptr before a game boots
David Marcec před 7 roky
rodič
revize
4476fd29d6
1 změnil soubory, kde provedl 3 přidání a 0 odebrání
  1. 3 0
      src/yuzu/configuration/configure_general.cpp

+ 3 - 0
src/yuzu/configuration/configure_general.cpp

@@ -47,6 +47,9 @@ void ConfigureGeneral::OnDockedModeChanged(bool last_state, bool new_state) {
     }
 
     Core::System& system{Core::System::GetInstance()};
+    if (!system.IsPoweredOn()) {
+        return;
+    }
     Service::SM::ServiceManager& sm = system.ServiceManager();
 
     // Message queue is shared between these services, we just need to signal an operation