Check infinity in setCoords() if object has zero width

Fix for object with zero width