[Libreoffice-commits] core.git: android/source

Tomaž Vajngerl tomaz.vajngerl at collabora.com
Sun Nov 1 14:07:45 PST 2015


 android/source/src/java/org/mozilla/gecko/gfx/ComposedTileLayer.java |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 37d41674c2b1a706c95c2c326cbfbd06b0c1a655
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.com>
Date:   Sun Nov 1 23:06:09 2015 +0100

    android: don't crash in LO when SurfaceView layout is 0 width
    
    Change-Id: I49be19b273d0c263637369e9b095f374b345191b

diff --git a/android/source/src/java/org/mozilla/gecko/gfx/ComposedTileLayer.java b/android/source/src/java/org/mozilla/gecko/gfx/ComposedTileLayer.java
index e11c91c..e902a06 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/ComposedTileLayer.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/ComposedTileLayer.java
@@ -149,6 +149,11 @@ public abstract class ComposedTileLayer extends Layer implements ComponentCallba
         RectF newViewPort = getViewPort(viewportMetrics);
         float newZoom = getZoom(viewportMetrics);
 
+        // When
+        if (newZoom <= 0.0 || Float.isNaN(newZoom)) {
+            return;
+        }
+
         if (currentViewport.equals(newViewPort) && FloatUtils.fuzzyEquals(currentZoom, newZoom)) {
             return;
         }


More information about the Libreoffice-commits mailing list