Bug fix, IRC report.

Mesh with very strange topology makes loop-select (ALT+select) crash.
Missing NULL check for do-while loop that can return NULL.

For Campbell: here's the file to check: http://www.pasteall.org/blend/21576



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56977 954f8c5b-7b00-dc11-b283-0030488c597c