Set document to nil in windowWillClose: to avoid ensuring main thread
Set document to nil in windowWillClose: to avoid ensuring main thread

JackieXie168/skim,JackieXie168/skim,JackieXie168/skim,JackieXie168/skim,JackieXie168/skim