OSDN Git Service

Updates to 3D gallery. Build 1203.
[android-x86/packages-apps-Gallery2.git] / src / com / cooliris / media / BackgroundLayer.java
index 6eba7ee..fef6bba 100644 (file)
@@ -21,7 +21,7 @@ public class BackgroundLayer extends Layer {
     private static final int ADAPTIVE_BACKGROUND_WIDTH = 256;
     private static final int ADAPTIVE_BACKGROUND_HEIGHT = 128;
 
-    BackgroundLayer(GridLayer layer) {
+    public BackgroundLayer(GridLayer layer) {
         mGridLayer = layer;
     }
 
@@ -94,7 +94,7 @@ public class BackgroundLayer extends Layer {
             view.bind(mFallbackBackground);
         } else {
             Texture texture = anchorTexture.getTexture();
-            if (texture.isLoaded()) {
+            if (texture != null && texture.isLoaded()) {
                 mFallbackBackground = texture;
             }
         }