diff options
author | cyBerta <cyberta@riseup.net> | 2022-05-05 15:22:39 +0200 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2022-05-05 15:22:39 +0200 |
commit | d9237447d4ae301a7839720f06d218723b3a92cc (patch) | |
tree | 6b8be0aaecdc10d0d241a85180a7792216876777 /app | |
parent | 0c3adf0ceff6c9fd4cd4910ae5257352ce5753c6 (diff) |
catch nullpointer exception in tile service
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/base/BitmaskTileService.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/base/BitmaskTileService.java b/app/src/main/java/se/leap/bitmaskclient/base/BitmaskTileService.java index 65355a67..370a7af6 100644 --- a/app/src/main/java/se/leap/bitmaskclient/base/BitmaskTileService.java +++ b/app/src/main/java/se/leap/bitmaskclient/base/BitmaskTileService.java @@ -71,6 +71,11 @@ public class BitmaskTileService extends TileService implements Observer { @Override public void update(Observable o, Object arg) { Tile t = getQsTile(); + // Tile t should never be null according to https://developer.android.com/reference/kotlin/android/service/quicksettings/TileService. + // Hovever we've got crash reports. + if (t == null) { + return; + } if (o instanceof EipStatus) { EipStatus status = (EipStatus) o; |