Explorar el Código

Fix possible cause of nullptr exception.

Halsafar hace 4 años
padre
commit
bf8af1e09c
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      SongBrowserPlugin/UI/Browser/SongBrowserUI.cs

+ 1 - 1
SongBrowserPlugin/UI/Browser/SongBrowserUI.cs

@@ -503,7 +503,7 @@ namespace SongBrowser.UI
 
             _asyncUpdating = true;
 
-            while (_beatUi.LevelSelectionNavigationController.GetPrivateField<bool>("_isInTransition") ||
+            while (_beatUi != null && (_beatUi.LevelSelectionNavigationController.GetPrivateField<bool>("_isInTransition") ||
                    _beatUi.LevelDetailViewController.GetPrivateField<bool>("_isInTransition") ||
                    !_beatUi.LevelSelectionNavigationController.isInViewControllerHierarchy ||
                    !_beatUi.LevelDetailViewController.isInViewControllerHierarchy ||