aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2011-05-20 20:28:56 -0700
committerTor Norbye <tnorbye@google.com>2011-05-20 20:28:56 -0700
commit8299b23d72bd9e8034de2090b29a4e39e6562759 (patch)
treed83c048ba3d2ce6d69ebb81a27d4c5af0486480f /eclipse
parent3e3045394d3f2562ddbc59e0b0e18b4ed18948e4 (diff)
downloadsdk-8299b23d72bd9e8034de2090b29a4e39e6562759.zip
sdk-8299b23d72bd9e8034de2090b29a4e39e6562759.tar.gz
sdk-8299b23d72bd9e8034de2090b29a4e39e6562759.tar.bz2
NPE safeguard
Change-Id: I3f55c21f79ad66bed1329a2f5882deb94e93be62
Diffstat (limited to 'eclipse')
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/MarqueeGesture.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/MarqueeGesture.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/MarqueeGesture.java
index c374b0e..b6f47bb 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/MarqueeGesture.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/MarqueeGesture.java
@@ -65,6 +65,10 @@ public class MarqueeGesture extends Gesture {
@Override
public void update(ControlPoint pos) {
+ if (mOverlay == null) {
+ return;
+ }
+
int x = Math.min(pos.x, mStart.x);
int y = Math.min(pos.y, mStart.y);
int w = Math.abs(pos.x - mStart.x);