From fd85ee4f4e166add0a04b945533e263da5bfcaee Mon Sep 17 00:00:00 2001
From: Jonathan Nielsen <jmnetus@familysearch.org>
Date: Fri, 4 Oct 2013 10:12:47 -0600
Subject: [PATCH] Check that zoom reference point is valid before using it

---
 src/viewport.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/viewport.js b/src/viewport.js
index 691851c4..5c4c9f2d 100644
--- a/src/viewport.js
+++ b/src/viewport.js
@@ -551,7 +551,9 @@ $.Viewport.prototype = {
      */
     zoomTo: function( zoom, refPoint, immediately ) {
 
-        this.zoomPoint = refPoint instanceof $.Point ?
+        this.zoomPoint = refPoint instanceof $.Point &&
+            !isNaN(refPoint.x) &&
+            !isNaN(refPoint.y) ?
             refPoint :
             null;