summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2020-03-05 17:19:41 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2020-03-06 07:19:06 +0100
commitb327ea0d74fee1589c0310d7ef7794cb294256b3 (patch)
treef62e6e1f2eae03b38a72e3035d0a5e64989f3433 /android
parent6d9930f307f08d2c32ee1bcca577cf643955cec9 (diff)
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@posteo.de>
Diffstat (limited to 'android')
-rw-r--r--android/source/src/java/org/libreoffice/LOKitThread.java2
1 files changed, 1 insertions, 1 deletions
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;
}