summaryrefslogtreecommitdiff
path: root/morphic.js
diff options
context:
space:
mode:
Diffstat (limited to 'morphic.js')
-rw-r--r--morphic.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/morphic.js b/morphic.js
index 3480cfa..046d1eb 100644
--- a/morphic.js
+++ b/morphic.js
@@ -9512,14 +9512,15 @@ HandMorph.prototype.processMouseMove = function (event) {
this.grab(morph);
this.grabOrigin = this.morphToGrab.situation();
}
- // if the mouse has left its fullBounds, center it
- fb = morph.fullBounds();
- if (!fb.containsPoint(pos)) {
- this.bounds.origin = fb.center();
- this.grab(morph);
- this.setPosition(pos);
+ if (morph) {
+ // if the mouse has left its fullBounds, center it
+ fb = morph.fullBounds();
+ if (!fb.containsPoint(pos)) {
+ this.bounds.origin = fb.center();
+ this.grab(morph);
+ this.setPosition(pos);
+ }
}
-
}
/*