Fix for #2606: Cannot read property x of undefined

Only setPosition if _getPos actually returns a valid position to this._newPos
Merge pull request #2607 from rvanbaalen/patch-1

Fix for #2606: Cannot read property x of undefined