commit 00aa398a0be797e821ab6d7604cb5939b207b1ec
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Thu Sep 9 23:24:25 2021 +0200

    safety!

diff --git a/src/main/java/org/distorted/screens/RubikScreenPlay.java b/src/main/java/org/distorted/screens/RubikScreenPlay.java
index d2193cc5..32a95cad 100644
--- a/src/main/java/org/distorted/screens/RubikScreenPlay.java
+++ b/src/main/java/org/distorted/screens/RubikScreenPlay.java
@@ -495,8 +495,16 @@ public class RubikScreenPlay extends RubikScreenBase
   private void displayPopup(RubikActivity act, View view, PopupWindow window, int w, int h, int xoff, int yoff)
     {
     View topLayout = act.findViewById(R.id.relativeLayout);
-    topLayout.getLocationOnScreen(mLocation);
-    mIsFullScreen = (mLocation[1]==0);
+
+    if( topLayout!=null )
+      {
+      topLayout.getLocationOnScreen(mLocation);
+      mIsFullScreen = (mLocation[1]==0);
+      }
+    else
+      {
+      mIsFullScreen = true;
+      }
 
     // if on Android 11 or we are fullscreen
     if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R || mIsFullScreen )
