aboutsummaryrefslogtreecommitdiffstats
path: root/showcaseview
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2014-08-27 20:38:13 +0200
committerBananeweizen <bananeweizen@gmx.de>2014-08-27 20:38:24 +0200
commit04db21224db27a6ff1b3a00e5d1fe1a63b3d5607 (patch)
treef6ddff7eb1ddcde0a6014a47ae9ad7310890f298 /showcaseview
parent8f4c7ba6de93db85218bdce75676a33af2d14486 (diff)
downloadcgeo-04db21224db27a6ff1b3a00e5d1fe1a63b3d5607.zip
cgeo-04db21224db27a6ff1b3a00e5d1fe1a63b3d5607.tar.gz
cgeo-04db21224db27a6ff1b3a00e5d1fe1a63b3d5607.tar.bz2
fix #4233: avoid NPE if showcase view target is not found
Diffstat (limited to 'showcaseview')
-rw-r--r--showcaseview/java/com/github/amlcurran/showcaseview/targets/ViewTarget.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/showcaseview/java/com/github/amlcurran/showcaseview/targets/ViewTarget.java b/showcaseview/java/com/github/amlcurran/showcaseview/targets/ViewTarget.java
index d59dd0d..b7fb4f5 100644
--- a/showcaseview/java/com/github/amlcurran/showcaseview/targets/ViewTarget.java
+++ b/showcaseview/java/com/github/amlcurran/showcaseview/targets/ViewTarget.java
@@ -37,6 +37,9 @@ public class ViewTarget implements Target {
@Override
public Point getPoint() {
+ if (mView == null) {
+ return null;
+ }
int[] location = new int[2];
mView.getLocationInWindow(location);
int x = location[0] + mView.getWidth() / 2;