Fix for a crash on startup/shutdown introduced in the tip of viewer-2-0 very recently.
Fix for a crash on startup/shutdown introduced in the tip of viewer-2-0 very recently.

list.erase(list.find()) is not safe, because erasing list.end() is undefined.  Check to make sure the find succeeded before doing the erase.

Reviewed by Richard at http://codereview.lindenlab.com/341001

gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm