fixed case of empty scores list even after loading from server
authorHolger Schemel <info@artsoft.org>
Mon, 21 Feb 2022 23:12:50 +0000 (00:12 +0100)
committerHolger Schemel <info@artsoft.org>
Mon, 21 Feb 2022 23:12:50 +0000 (00:12 +0100)
src/screens.c

index 62eb2979cd59bbc752c5ff95d8e1e8f206ab9c63..4c361ae4d84b5550c83d82ec1124137f10f7149a 100644 (file)
@@ -5145,10 +5145,13 @@ static void HandleChooseTree(int mx, int my, int dx, int dy, int button,
 
       DrawHallOfFame_setScoreEntries();
 
-      ti = setHallOfFameActiveEntry(ti_ptr);
+      if (score_entries != NULL)
+      {
+       ti = setHallOfFameActiveEntry(ti_ptr);
 
-      if (button != MB_MENU_INITIALIZE)
-       drawChooseTreeScreen(ti);
+       if (button != MB_MENU_INITIALIZE)
+         drawChooseTreeScreen(ti);
+      }
     }
 
     if (score_entries == NULL)