Browse Source

Fix possible cause of nullptr exception.

Halsafar 4 years ago
parent
commit
bf8af1e09c
1 changed files with 1 additions and 1 deletions
  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 ||