bug 701703 - Null pointer exception thrown loading Fennec Start Page r=dougt
authorBrad Lassey <blassey@mozilla.com>
Wed, 16 Nov 2011 10:42:10 -0500
changeset 81862 96949a8ed9225e534c6744416de7a1b1f69b3f52
parent 81861 f2ca3fedd77115af24a1185696a865c75bf6a7c7
child 81863 fc9431ac4617ae4ae4cc4efe13f820d2e7a6ec2a
push idunknown
push userunknown
push dateunknown
reviewersdougt
bugs701703
milestone11.0a1
bug 701703 - Null pointer exception thrown loading Fennec Start Page r=dougt
embedding/android/gfx/GeckoSoftwareLayerClient.java
--- a/embedding/android/gfx/GeckoSoftwareLayerClient.java
+++ b/embedding/android/gfx/GeckoSoftwareLayerClient.java
@@ -140,16 +140,18 @@ public class GeckoSoftwareLayerClient ex
     }
 
     /*
      * TODO: Would be cleaner if this took an android.graphics.Rect instead, but that would require
      * a little more JNI magic.
      */
     public void endDrawing(int x, int y, int width, int height) {
         LayerController controller = getLayerController();
+        if (controller == null)
+            return;
         //controller.unzoom();  /* FIXME */
         controller.notifyViewOfGeometryChange();
 
         mViewportController.setVisibleRect(mGeckoVisibleRect);
 
         if (mGeckoVisibleRect != null) {
             RectF layerRect = mViewportController.untransformVisibleRect(mGeckoVisibleRect,
                                                                          getPageSize());