Fixes possible null pointer exception if restore state done before attach to window

git-svn-id: http://csipsimple.googlecode.com/svn/trunk/CSipSimple@2412 9f815046-5998-e9c0-b7e2-ac03a23edfa4