commit d5032ac8238fdf13e718a26aa70a1d9ea08e6803
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Fri May 8 11:13:04 2020 +0100

    Fix for the next crash seen in the field.

diff --git a/src/main/java/org/distorted/objects/RubikObject.java b/src/main/java/org/distorted/objects/RubikObject.java
index 94f666f1..15be196b 100644
--- a/src/main/java/org/distorted/objects/RubikObject.java
+++ b/src/main/java/org/distorted/objects/RubikObject.java
@@ -414,11 +414,19 @@ public abstract class RubikObject extends DistortedNode
     {
     final int numFaces = getNumFaces();
     final float ratio = 1.0f/(numFaces+1);
-
     final Static4D[] maps = new Static4D[numFaces];
-    maps[face] = new Static4D( newColor*ratio, 0.0f, ratio, 1.0f);
 
-    mCubits[cubit].getMesh().setTextureMap(maps);
+    try
+      {
+      maps[face] = new Static4D( newColor*ratio, 0.0f, ratio, 1.0f);
+      mCubits[cubit].getMesh().setTextureMap(maps);
+      }
+    catch(ArrayIndexOutOfBoundsException ignored)
+      {
+      // the object must have changed in between of us touching the screen and getting here
+      // (which happens after the next render, i.e. about 30 miliseconds later)
+      // ignore.
+      }
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
