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

Michael Weghorn (via logerrit) logerrit at kemper.freedesktop.org
Fri Mar 6 06:19:37 UTC 2020


 android/source/src/java/org/libreoffice/LOKitThread.java |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b327ea0d74fee1589c0310d7ef7794cb294256b3
Author:     Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Thu Mar 5 17:19:41 2020 +0100
Commit:     Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Fri Mar 6 07:19:06 2020 +0100

    android: Avoid crash when tapping while document is being loaded
    
    'mViewportMetrics' can be null here, e.g. while the document is
    still being loaded.
    
    This fixes a crash that happened e.g. when tapping on the screen
    while document was still being loaded.
    
    Change-Id: Ib3f237ecf64c05a5736d97e00b46d0de2ef051a0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90048
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>

diff --git a/android/source/src/java/org/libreoffice/LOKitThread.java b/android/source/src/java/org/libreoffice/LOKitThread.java
index c9d1fa0508bd..2031b95e25f8 100644
--- a/android/source/src/java/org/libreoffice/LOKitThread.java
+++ b/android/source/src/java/org/libreoffice/LOKitThread.java
@@ -436,7 +436,7 @@ class LOKitThread extends Thread {
      * Processes touch events.
      */
     private void touch(String touchType, PointF documentCoordinate) {
-        if (mTileProvider == null) {
+        if (mTileProvider == null || mViewportMetrics == null) {
             return;
         }
 


More information about the Libreoffice-commits mailing list