commit 67179b407ad4962dec05338ae53bb8448956fb9e
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Mon Jan 9 18:25:03 2023 +0100

    SetName dialog can become entangled in exceptions...

diff --git a/src/main/java/org/distorted/dialogs/RubikDialogSetName.java b/src/main/java/org/distorted/dialogs/RubikDialogSetName.java
index a1407d57..fbd6cc29 100644
--- a/src/main/java/org/distorted/dialogs/RubikDialogSetName.java
+++ b/src/main/java/org/distorted/dialogs/RubikDialogSetName.java
@@ -132,17 +132,24 @@ public class RubikDialogSetName extends AppCompatDialogFragment
 
           name = name.replace(' ', '_');
 
-          RubikActivity act = (RubikActivity)getActivity();
-          ScreenList.switchScreen(act, ScreenList.PLAY);
-          RubikScores.getInstance().setName(name);
+          try
+            {
+            RubikActivity act = (RubikActivity)getActivity();
+            ScreenList.switchScreen(act, ScreenList.PLAY);
+            RubikScores.getInstance().setName(name);
 
-          Bundle bundle = new Bundle();
-          bundle.putInt("tab", RubikObjectList.getCurrObject() );
-          bundle.putBoolean("submitting", true);
+            Bundle bundle = new Bundle();
+            bundle.putInt("tab", RubikObjectList.getCurrObject() );
+            bundle.putBoolean("submitting", true);
 
-          RubikDialogScores scores = new RubikDialogScores();
-          scores.setArguments(bundle);
-          scores.show(act.getSupportFragmentManager(), null);
+            RubikDialogScores scores = new RubikDialogScores();
+            scores.setArguments(bundle);
+            scores.show(act.getSupportFragmentManager(), null);
+            }
+          catch(IllegalStateException ex)
+            {
+            android.util.Log.e("D", "IllegalStateException trying to display SetName");
+            }
           }
         }
       });
