aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse/plugins
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2011-05-23 11:27:44 -0700
committerAndroid Code Review <code-review@android.com>2011-05-23 11:27:44 -0700
commit1f03a6d703421d94c392c5afc74f7036d4c71167 (patch)
tree1eb8414fccfd41e2304cf4462c0beedb78fdb241 /eclipse/plugins
parentdcbfce9856f29d06dafcf8d5becddab4a7655af7 (diff)
parent8299b23d72bd9e8034de2090b29a4e39e6562759 (diff)
downloadsdk-1f03a6d703421d94c392c5afc74f7036d4c71167.zip
sdk-1f03a6d703421d94c392c5afc74f7036d4c71167.tar.gz
sdk-1f03a6d703421d94c392c5afc74f7036d4c71167.tar.bz2
Merge "NPE safeguard"
Diffstat (limited to 'eclipse/plugins')
-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);